Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubocop: Update 1.28.2->1.50.0; requires Ruby 2.6 #115

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ require:
- rubocop-rake

AllCops:
# Puppet agent 6 ships with ruby 2.5. Puppetserver 6 uses JRuby 9.2.x (Ruby 2.5 compatible) since version 6.1.0.
TargetRubyVersion: 2.5
# Puppetserver 7 uses Jruby 9.3 which is compatible to C Ruby 2.6
TargetRubyVersion: 2.6
DisplayCopNames: true
ExtraDetails: true
DisplayStyleGuide: true
Expand Down Expand Up @@ -570,8 +570,6 @@ Naming/MethodParameterName:
AllowedNames: ['at', 'by', 'to', 'db', 'id', 'in', 'io', 'ip', 'of', 'on', 'os', 'pp', 'is']

# New cops available after rubocop upgrade
Gemspec/DateAssignment: # (new in 1.10)
Enabled: true
Lint/AmbiguousAssignment: # (new in 1.7)
Enabled: true
Lint/DeprecatedConstants: # (new in 1.8)
Expand Down Expand Up @@ -668,3 +666,6 @@ RSpec/Rails/AvoidSetupHook: # new in 2.4
Enabled: true
RSpec/ImplicitSubject:
Enabled: false
# new configurations since rubocop 1.50.0
RSpec/NoExpectationExample:
Enabled: false
7 changes: 4 additions & 3 deletions voxpupuli-test.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'rspec-puppet-utils', '~> 3.4'

# Rubocop
# newest versions that still support Ruby 2.5
s.add_runtime_dependency 'rubocop', '~> 1.28.2'
s.add_runtime_dependency 'rubocop-rspec', '~> 2.10.0'
# newest versions that still support Ruby 2.6
# jruby 9.3 in Puppetserver 7 is compatible with C Ruby 2.6
s.add_runtime_dependency 'rubocop', '~> 1.50.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm had a look: 1.56 is latest

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but that doesn't work on Ruby 2.6.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah okay. thats the thing.

s.add_runtime_dependency 'rubocop-rspec', '~> 2.20.0'
s.add_runtime_dependency 'rubocop-rake', '~> 0.6.0'

# Linting
Expand Down