Skip to content

Commit c25251d

Browse files
Merge pull request #279 from puppetlabs/CAT-1688-Upgrade_rubocop
(CAT-1688) Upgrade rubocop to `~> 1.50.0`
2 parents d9e902b + 81764ca commit c25251d

File tree

3 files changed

+11
-28
lines changed

3 files changed

+11
-28
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ AllCops:
1818
Style/ClassAndModuleChildren:
1919
Enabled: false
2020

21+
Layout/LineLength:
22+
Max: 196
23+
2124
####################################################
2225
# Cops below here due for deprecation
2326
####################################################

.rubocop_todo.yml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2023-04-12 14:55:26 UTC using RuboCop version 1.50.1.
3+
# on 2024-01-23 11:29:18 UTC using RuboCop version 1.50.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -14,13 +14,6 @@ Gemspec/RequireMFA:
1414
Exclude:
1515
- 'ruby-pwsh.gemspec'
1616

17-
# Offense count: 1
18-
# Configuration parameters: Severity, Include.
19-
# Include: **/*.gemspec
20-
Gemspec/RequiredRubyVersion:
21-
Exclude:
22-
- 'ruby-pwsh.gemspec'
23-
2417
# Offense count: 1
2518
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
2619
Lint/DuplicateBranch:
@@ -38,11 +31,11 @@ Lint/EmptyClass:
3831
Lint/IncompatibleIoSelectWithFiberScheduler:
3932
Exclude:
4033
- 'lib/pwsh.rb'
41-
#
34+
4235
# Offense count: 17
4336
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
4437
Metrics/AbcSize:
45-
Max: 86
38+
Max: 83
4639

4740
# Offense count: 2
4841
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
@@ -53,12 +46,12 @@ Metrics/BlockLength:
5346
# Offense count: 2
5447
# Configuration parameters: CountComments, CountAsOne.
5548
Metrics/ClassLength:
56-
Max: 529
49+
Max: 526
5750

5851
# Offense count: 12
5952
# Configuration parameters: AllowedMethods, AllowedPatterns.
6053
Metrics/CyclomaticComplexity:
61-
Max: 25
54+
Max: 24
6255

6356
# Offense count: 22
6457
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
@@ -68,7 +61,7 @@ Metrics/MethodLength:
6861
# Offense count: 10
6962
# Configuration parameters: AllowedMethods, AllowedPatterns.
7063
Metrics/PerceivedComplexity:
71-
Max: 25
64+
Max: 24
7265

7366
# Offense count: 1
7467
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
@@ -97,7 +90,7 @@ RSpec/BeforeAfterAll:
9790
- 'spec/support/**/*.rb'
9891
- 'spec/acceptance/dsc/basic.rb'
9992

100-
# Offense count: 81
93+
# Offense count: 26
10194
# Configuration parameters: Prefixes, AllowedPatterns.
10295
# Prefixes: when, with, without
10396
RSpec/ContextWording:
@@ -107,7 +100,6 @@ RSpec/ContextWording:
107100
- 'spec/acceptance/dsc/class.rb'
108101
- 'spec/acceptance/dsc/complex.rb'
109102
- 'spec/unit/puppet/provider/dsc_base_provider/dsc_base_provider_spec.rb'
110-
- 'spec/unit/pwsh/util_spec.rb'
111103
- 'spec/unit/pwsh/windows_powershell_spec.rb'
112104
- 'spec/unit/pwsh_spec.rb'
113105

@@ -176,22 +168,10 @@ RSpec/SubjectStub:
176168
Exclude:
177169
- 'spec/unit/puppet/provider/dsc_base_provider/dsc_base_provider_spec.rb'
178170

179-
# Offense count: 6
180-
Style/ClassVars:
181-
Exclude:
182-
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'
183-
184171
# Offense count: 1
185172
# Configuration parameters: AllowedConstants.
186173
Style/Documentation:
187174
Exclude:
188175
- 'spec/**/*'
189176
- 'test/**/*'
190177
- 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb'
191-
192-
# Offense count: 121
193-
# This cop supports safe autocorrection (--autocorrect).
194-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
195-
# URISchemes: http, https
196-
Layout/LineLength:
197-
Max: 196

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ group :development do
2929
gem "parallel_tests", '= 3.12.1', require: false
3030
gem "pry", '~> 0.10', require: false
3131
gem "puppet-debugger", '~> 1.0', require: false
32-
gem "rubocop", '= 1.48.1', require: false
32+
gem "rubocop", '~> 1.50.0', require: false
3333
gem "rubocop-performance", '= 1.16.0', require: false
3434
gem "rubocop-rspec", '= 2.19.0', require: false
3535
gem "puppet-strings", '~> 4.0', require: false

0 commit comments

Comments
 (0)