'Dangerfile' needs to be appended to the path

parent ba846520
Pipeline #31331 failed with stage
in 1 minute and 9 seconds
......@@ -11,10 +11,10 @@ Provides rules for [Danger](https://danger.systems/ruby/) that ~~can~~ should
```ruby
# imports all rules
danger.import_dangerfile(gitlab: 'open-source/danger-rules', path: 'rules/all')
danger.import_dangerfile(gitlab: 'open-source/danger-rules', path: 'rules/all/Dangerfile')
# only import one specific rule
danger.import_dangerfile(gitlab: 'open-source/danger-rules', path: 'rules/git/wip_commit')
danger.import_dangerfile(gitlab: 'open-source/danger-rules', path: 'rules/git/wip_commit/Dangerfile')
```
Available rules:
......
......@@ -36,7 +36,6 @@ task 'generate:readme' do
files = [ALL_DANGER_FILE, *danger_files].map do |file|
file
.sub(%r{^src/}, '')
.sub(%r{/Dangerfile$}, '')
.gsub('_', '\_')
.yield_self { |f| "rules/#{f}" }
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment