Skip to content

Commit 9342354

Browse files
committed
Fix an error when running rake new_cop
Follow up to rubocop/rubocop#10109. This commit fixes the following error. ```console % bundle exec rake new_cop\[Department/CustomCop\] rake aborted! ArgumentError: wrong number of arguments (given 2, expected 1) /Users/koic/src/github.com/rubocop/rubocop-rails/Rakefile:58:in `new' /Users/koic/src/github.com/rubocop/rubocop-rails/Rakefile:58:in `block in <top (required)>' /Users/koic/.rbenv/versions/3.0.2/bin/bundle:23:in `load' /Users/koic/.rbenv/versions/3.0.2/bin/bundle:23:in `<main>' Tasks: TOP => new_cop (See full trace by running task with --trace) ```
1 parent 612bb85 commit 9342354

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Rakefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ task :new_cop, [:cop] do |_task, args|
5252
exit!
5353
end
5454

55-
github_user = `git config github.user`.chop
56-
github_user = 'your_id' if github_user.empty?
57-
58-
generator = RuboCop::Cop::Generator.new(cop_name, github_user)
55+
generator = RuboCop::Cop::Generator.new(cop_name)
5956

6057
generator.write_source
6158
generator.write_spec

0 commit comments

Comments
 (0)