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 23, 2024
1 parent 736916b commit 56820c5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
37 changes: 15 additions & 22 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-09-26 10:42:02 UTC using RuboCop version 1.48.1.
# on 2024-01-23 14:26:06 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: 1
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
Lint/DuplicateBranch:
Expand Down Expand Up @@ -38,6 +35,7 @@ Lint/NonAtomicFileOperation:
Lint/OrAssignmentToConstant:
Exclude:
- 'lib/puppet-languageserver/session_state/document_store.rb'

# Offense count: 169
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Expand All @@ -59,7 +57,7 @@ Metrics/ClassLength:
Metrics/CyclomaticComplexity:
Max: 42

# Offense count: 139
# Offense count: 138
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 100
Expand All @@ -74,7 +72,7 @@ Metrics/ModuleLength:
Metrics/ParameterLists:
Max: 6

# Offense count: 42
# Offense count: 43
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 32
Expand All @@ -87,7 +85,6 @@ Naming/MemoizedInstanceVariableName:
- 'lib/puppet-languageserver-sidecar/puppet_strings_monkey_patches.rb'
- 'lib/puppet-languageserver/server_capabilities.rb'


# Offense count: 3
# Configuration parameters: MinSize.
Performance/CollectionLiteralInLoop:
Expand All @@ -100,24 +97,26 @@ Performance/Count:
Exclude:
- 'lib/puppet-languageserver/session_state/language_client.rb'



# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Security/IoMethods:
Exclude:
- 'lib/puppet-debugserver/debug_session/break_points.rb'


# Offense count: 5
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedMethods, AllowedPatterns.
# AllowedMethods: ==, equal?, eql?
Style/ClassEqualityComparison:
Exclude:
- 'lib/puppet-languageserver/manifest/definition_provider.rb'
- 'lib/puppet-languageserver/manifest/signature_provider.rb'

# Offense count: 104
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false




# Offense count: 4
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedReceivers.
Expand All @@ -129,10 +128,6 @@ Style/HashEachMethods:
- 'lib/puppet-languageserver-sidecar/puppet_strings_helper.rb'
- 'lib/puppet-languageserver/manifest/folding_provider.rb'





# Offense count: 7
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
Expand Down Expand Up @@ -160,8 +155,7 @@ Style/OptionalBooleanParameter:
- 'lib/puppet-languageserver/uri_helper.rb'
- 'lib/puppet_editor_services/server/tcp.rb'


# Offense count: 34
# Offense count: 29
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
# AllowedMethods: present?, blank?, presence, try, try!
Expand Down Expand Up @@ -189,14 +183,13 @@ Style/SlicingWithRange:
- 'lib/puppet-languageserver/manifest/hover_provider.rb'
- 'lib/puppet-languageserver/puppet_lexer_helper.rb'

# Offense count: 6
# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
# AllowedMethods: define_method
Style/SymbolProc:
Exclude:
- 'lib/dsp/dsp_base.rb'
- 'lib/puppet-languageserver-sidecar/cache/filesystem.rb'
- 'lib/puppet-languageserver-sidecar/puppet_helper.rb'
- 'lib/puppet-languageserver/client_session_state.rb'
- 'lib/puppet-languageserver/session_state/object_cache.rb'
Expand All @@ -210,7 +203,7 @@ Style/ZeroLengthPredicate:
- 'lib/puppet-languageserver/message_handler.rb'
- 'lib/puppet_editor_services/server/tcp.rb'

# Offense count: 629
# Offense count: 622
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ group :development do
gem 'puppet-lint', '~> 4.0', :require => false
gem 'puppetfile-resolver', '~> 0.6.2', :require => false
gem 'yard', '~> 0.9.28', :require => false
gem "rubocop", '~> 1.48.1', :require => false
gem "rubocop", '~> 1.50.0', :require => false
gem "rubocop-performance", '~> 1.16', :require => false
gem "rubocop-rspec", '~> 2.19', :require => false
gem 'simplecov', :require => false
Expand Down

0 comments on commit 56820c5

Please sign in to comment.