Skip to content

Commit

Permalink
Merge pull request #1491 from ydah/rake_newcop
Browse files Browse the repository at this point in the history
Change the `rake newcop` task to output `<<next>>` instead of the next minor version for config/default.yml
  • Loading branch information
bquorning committed Nov 18, 2022
2 parents 4b98ef6 + d84f5bc commit 852052b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ task :new_cop, [:cop] do |_task, args|
generator.write_source
generator.write_spec
generator.inject_require(root_file_path: 'lib/rubocop/cop/rspec_cops.rb')
generator.inject_config(config_file_path: 'config/default.yml',
version_added: bump_minor_version)
generator.inject_config

puts generator.todo
end

def bump_minor_version
major, minor, _patch = RuboCop::RSpec::Version::STRING.split('.')

"#{major}.#{minor.succ}.0"
end

0 comments on commit 852052b

Please sign in to comment.