Skip to content

Commit

Permalink
(CAT-1688) Upgrade rubocop
Browse files Browse the repository at this point in the history
Following a recent team decision, we are implementing a Rubocop Upgrade,
moving the version from 1.48.1 to 1.50.0. This should be the final
version until Puppet 7 is unsupported.
  • Loading branch information
LukasAud committed Jan 19, 2024
1 parent 409c5c9 commit 4b0f24c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
inherit_from: .rubocop_todo.yml

AllCops:
NewCops: enable
Include:
- 'lib/**/*.rb'
- 'puppetfile-cli.rb'
Expand Down
46 changes: 45 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-10-27 07:36:27 UTC using RuboCop version 1.48.1.
# on 2024-01-19 15:46:30 UTC using RuboCop version 1.50.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Lint/AmbiguousOperatorPrecedence:
Exclude:
- 'lib/puppetfile-resolver/puppetfile/parser/r10k_eval.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/DuplicateRequire:
Expand All @@ -17,6 +23,20 @@ Lint/MissingSuper:
Exclude:
- 'lib/puppetfile-resolver/puppetfile/parser/errors.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/NonAtomicFileOperation:
Exclude:
- 'lib/puppetfile-resolver/cache/persistent.rb'

# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/OrAssignmentToConstant:
Exclude:
- 'lib/puppetfile-resolver/puppetfile/parser/r10k_eval.rb'
- 'lib/puppetfile-resolver/spec_searchers/forge_configuration.rb'
- 'lib/puppetfile-resolver/version.rb'

# Offense count: 2
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
Expand Down Expand Up @@ -53,6 +73,18 @@ Style/CombinableLoops:
Exclude:
- 'lib/puppetfile-resolver/puppetfile/document.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/ConcatArrayLiterals:
Exclude:
- 'lib/puppetfile-resolver/util.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/FileRead:
Exclude:
- 'puppetfile-cli.rb'

# Offense count: 1
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Expand All @@ -66,6 +98,18 @@ Style/RedundantAssignment:
Exclude:
- 'lib/puppetfile-resolver/puppetfile/parser/r10k_eval/module/local.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantConstantBase:
Exclude:
- 'puppetfile-cli.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantFreeze:
Exclude:
- 'lib/puppetfile-resolver/puppetfile/parser/r10k_eval/module/forge.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantRegexpEscape:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ group :test do
gem 'rspec-collection_matchers', '~> 1.0'
gem 'rspec-its', '~> 1.0'

gem 'rubocop', '~> 1.48.1'
gem 'rubocop', '~> 1.50.0'
gem 'rubocop-rspec', '~> 2.19'
gem 'rubocop-performance', '~> 1.16'

Expand Down

0 comments on commit 4b0f24c

Please sign in to comment.