Skip to content

Commit

Permalink
Follow "Make it possible to set StyleGuideBaseURL per department"
Browse files Browse the repository at this point in the history
Follow up rubocop/rubocop#7295.

This commit fixes the following error.

```console
% bundle exec rake
The `SafeMode` option will be removed in `RuboCop` 0.76. Please update
`rubocop-performance` to 1.15.0 or higher.
Files:          25
Modules:         3 (    3 undocumented)
Classes:        26 (    0 undocumented)
Constants:      50 (   45 undocumented)
Attributes:      0 (    0 undocumented)
Methods:        53 (   47 undocumented)
 28.03% documented
rake aborted!
ArgumentError: wrong number of arguments (given 3, expected 4)
tasks/cops_documentation.rake:154:in `new'
tasks/cops_documentation.rake:154:in `references'
tasks/cops_documentation.rake:24:in `cops_body'
tasks/cops_documentation.rake:197:in `print_cop_with_doc'
tasks/cops_documentation.rake:173:in `block in print_cops_of_department'
tasks/cops_documentation.rake:172:in `each'
tasks/cops_documentation.rake:172:in `print_cops_of_department'
tasks/cops_documentation.rake:268:in `block in main'
tasks/cops_documentation.rake:267:in `each'
tasks/cops_documentation.rake:267:in `main'
tasks/cops_documentation.rake:278:in `block in <top (required)>'
/Users/koic/.rbenv/versions/2.6.3/bin/bundle:23:in `load'
/Users/koic/.rbenv/versions/2.6.3/bin/bundle:23:in `<main>'
Tasks: TOP => default => generate_cops_documentation
(See full trace by running task with --trace)
```
  • Loading branch information
koic committed Aug 19, 2019
1 parent 1d2c7f7 commit 6104a15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/cops_documentation.rake
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ task generate_cops_documentation: :yard_for_generate_documentation do

def references(config, cop)
cop_config = config.for_cop(cop)
urls = RuboCop::Cop::MessageAnnotator.new(config, cop_config, {}).urls
urls = RuboCop::Cop::MessageAnnotator.new(
config, cop.name, cop_config, {}
).urls
return '' if urls.empty?

content = h3('References')
Expand Down

0 comments on commit 6104a15

Please sign in to comment.