Skip to content

Commit e3c0a6e

Browse files
authored
Merge pull request puppetlabs#90 from bastelfreak/vp
switch to voxpupuli-rubocop
2 parents c407756 + 41b3b49 commit e3c0a6e

File tree

5 files changed

+79
-46
lines changed

5 files changed

+79
-46
lines changed

.rubocop.yml

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1+
---
12
inherit_from: .rubocop_todo.yml
23

3-
require:
4-
- rubocop-performance
5-
- rubocop-rspec
6-
7-
AllCops:
8-
Exclude:
9-
- Gemfile
10-
- Rakefile
11-
- spec/fixtures/**/*
12-
- vendor/bundle/**/*
13-
NewCops: enable
14-
SuggestExtensions: false
15-
TargetRubyVersion: '2.7'
4+
inherit_gem:
5+
voxpupuli-rubocop: rubocop.yml
166

177
# Disabled
188
Style/ClassAndModuleChildren:

.rubocop_todo.yml

+68-29
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,29 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2023-04-18 09:21:48 UTC using RuboCop version 1.50.2.
3+
# on 2024-06-28 11:45:55 UTC using RuboCop version 1.64.1.
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
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 1
9+
# Offense count: 2
1010
# This cop supports safe autocorrection (--autocorrect).
11-
# Configuration parameters: Severity, Include.
12-
# Include: **/*.gemspec
13-
Gemspec/RequireMFA:
11+
Layout/EmptyLines:
1412
Exclude:
15-
- 'puppet-modulebuilder.gemspec'
13+
- 'Gemfile'
14+
- 'Rakefile'
1615

1716
# Offense count: 1
18-
# Configuration parameters: Severity, Include.
19-
# Include: **/*.gemspec
20-
Gemspec/RequiredRubyVersion:
17+
# This cop supports safe autocorrection (--autocorrect).
18+
# Configuration parameters: Width, AllowedPatterns.
19+
Layout/IndentationWidth:
2120
Exclude:
22-
- 'puppet-modulebuilder.gemspec'
23-
24-
# Offense count: 5
25-
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
26-
Metrics/AbcSize:
27-
Max: 31
28-
29-
# Offense count: 1
30-
# Configuration parameters: CountComments, CountAsOne.
31-
Metrics/ClassLength:
32-
Max: 255
33-
34-
# Offense count: 6
35-
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
36-
Metrics/MethodLength:
37-
Max: 25
21+
- 'Rakefile'
3822

3923
# Offense count: 1
40-
# Configuration parameters: MinSize.
41-
Performance/CollectionLiteralInLoop:
24+
Lint/MixedRegexpCaptureTypes:
4225
Exclude:
43-
- 'spec/acceptance/puppet/modulebuilder/builder_spec.rb'
26+
- 'Gemfile'
4427

4528
# Offense count: 4
4629
# Configuration parameters: Prefixes, AllowedPatterns.
@@ -82,11 +65,67 @@ RSpec/NamedSubject:
8265
RSpec/NestedGroups:
8366
Max: 5
8467

85-
# Offense count: 33
68+
# Offense count: 32
8669
RSpec/SubjectStub:
8770
Exclude:
8871
- 'spec/unit/puppet/modulebuilder/builder_spec.rb'
8972

73+
# Offense count: 1
74+
# This cop supports safe autocorrection (--autocorrect).
75+
# Configuration parameters: AllowedVars.
76+
Style/FetchEnvVar:
77+
Exclude:
78+
- 'Gemfile'
79+
80+
# Offense count: 1
81+
# This cop supports safe autocorrection (--autocorrect).
82+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
83+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
84+
# SupportedShorthandSyntax: always, never, either, consistent, either_consistent
85+
Style/HashSyntax:
86+
Exclude:
87+
- 'Gemfile'
88+
89+
# Offense count: 2
90+
# This cop supports safe autocorrection (--autocorrect).
91+
Style/RedundantRegexpEscape:
92+
Exclude:
93+
- 'Gemfile'
94+
95+
# Offense count: 1
96+
# This cop supports safe autocorrection (--autocorrect).
97+
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
98+
# SupportedStyles: slashes, percent_r, mixed
99+
Style/RegexpLiteral:
100+
Exclude:
101+
- 'Gemfile'
102+
103+
# Offense count: 1
104+
# This cop supports safe autocorrection (--autocorrect).
105+
# Configuration parameters: MinSize.
106+
# SupportedStyles: percent, brackets
107+
Style/SymbolArray:
108+
EnforcedStyle: brackets
109+
110+
# Offense count: 7
111+
# This cop supports safe autocorrection (--autocorrect).
112+
# Configuration parameters: EnforcedStyleForMultiline.
113+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
114+
Style/TrailingCommaInArrayLiteral:
115+
Exclude:
116+
- 'lib/puppet/modulebuilder/builder.rb'
117+
- 'spec/spec_helper.rb'
118+
- 'spec/unit/puppet/modulebuilder/builder_spec.rb'
119+
120+
# Offense count: 3
121+
# This cop supports safe autocorrection (--autocorrect).
122+
# Configuration parameters: EnforcedStyleForMultiline.
123+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
124+
Style/TrailingCommaInHashLiteral:
125+
Exclude:
126+
- 'lib/puppet/modulebuilder/builder.rb'
127+
- 'spec/unit/puppet/modulebuilder/builder_spec.rb'
128+
90129
# Offense count: 9
91130
# This cop supports safe autocorrection (--autocorrect).
92131
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.

Gemfile

-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ group :development do
2424
gem 'rake'
2525
gem 'rspec', '~> 3.1'
2626

27-
gem 'rubocop', '~> 1.64.0', require: false
28-
gem 'rubocop-performance', '~> 1.16', require: false
29-
gem 'rubocop-rspec', '~> 3.0', require: false
30-
3127
gem 'simplecov'
3228
gem 'simplecov-console'
3329

Rakefile

+6
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ RSpec::Core::RakeTask.new(:acceptance) do |t|
2121
end
2222

2323
task default: [:spec, :acceptance]
24+
25+
begin
26+
require 'voxpupuli/rubocop/rake'
27+
rescue LoadError
28+
# the voxpupuli-rubocop gem is optional
29+
end

puppet-modulebuilder.gemspec

+2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ Gem::Specification.new do |spec|
2727
spec.add_runtime_dependency 'minitar', '~> 0.9'
2828
spec.add_runtime_dependency 'pathspec', '>= 0.2.1', '< 2.0.0'
2929

30+
spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0'
31+
3032
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
3133
end

0 commit comments

Comments
 (0)