Skip to content

Commit ecae40d

Browse files
committed
Add rubocop-rake and rubocop-rspec dev gems
1 parent eb288e8 commit ecae40d

File tree

4 files changed

+126
-4
lines changed

4 files changed

+126
-4
lines changed

.rubocop.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
inherit_from: .rubocop_todo.yml
22

3+
require:
4+
- rubocop-rake
5+
- rubocop-rspec
6+
37
AllCops:
48
NewCops: disable
59
TargetRubyVersion: 3.1
10+
Exclude:
11+
- 'lib/template/*.spec'
612

713
Layout/LineLength:
814
Max: 140

.rubocop_todo.yml

+112-4
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 2024-12-19 18:05:31 UTC using RuboCop version 1.69.2.
3+
# on 2024-12-20 12:32:51 UTC using RuboCop version 1.69.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
@@ -104,11 +104,11 @@ Lint/UriEscapeUnescape:
104104
Exclude:
105105
- 'lib/tetra/ui/get_pom_subcommand.rb'
106106

107-
# Offense count: 19
108-
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
107+
# Offense count: 2
108+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
109109
# AllowedMethods: refine
110110
Metrics/BlockLength:
111-
Max: 186
111+
Max: 27
112112

113113
# Offense count: 1
114114
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
@@ -122,6 +122,114 @@ Naming/MethodParameterName:
122122
Exclude:
123123
- 'lib/tetra/ui/subcommand.rb'
124124

125+
# Offense count: 1
126+
RSpec/Be:
127+
Exclude:
128+
- 'spec/lib/fine/project_spec.rb'
129+
130+
# Offense count: 20
131+
# This cop supports unsafe autocorrection (--autocorrect-all).
132+
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
133+
# SupportedStyles: described_class, explicit
134+
RSpec/DescribedClass:
135+
Exclude:
136+
- 'spec/lib/fine/ant_spec.rb'
137+
- 'spec/lib/fine/git_spec.rb'
138+
- 'spec/lib/fine/kit_package_spec.rb'
139+
- 'spec/lib/fine/kit_spec.rb'
140+
- 'spec/lib/fine/maven_website_spec.rb'
141+
- 'spec/lib/fine/mvn_spec.rb'
142+
- 'spec/lib/fine/package_spec.rb'
143+
- 'spec/lib/fine/pom_getter_spec.rb'
144+
- 'spec/lib/fine/pom_spec.rb'
145+
- 'spec/lib/fine/project_spec.rb'
146+
- 'spec/lib/fine/tar_spec.rb'
147+
- 'spec/lib/fine/unzip_spec.rb'
148+
- 'spec/lib/fine/version_matcher_spec.rb'
149+
150+
# Offense count: 4
151+
# This cop supports safe autocorrection (--autocorrect).
152+
# Configuration parameters: AllowConsecutiveOneLiners.
153+
RSpec/EmptyLineAfterExample:
154+
Exclude:
155+
- 'spec/lib/fine/git_spec.rb'
156+
- 'spec/lib/fine/kit_spec.rb'
157+
- 'spec/lib/fine/maven_website_spec.rb'
158+
- 'spec/lib/fine/project_spec.rb'
159+
160+
# Offense count: 35
161+
# Configuration parameters: CountAsOne.
162+
RSpec/ExampleLength:
163+
Max: 40
164+
165+
# Offense count: 19
166+
# This cop supports safe autocorrection (--autocorrect).
167+
# Configuration parameters: .
168+
# SupportedStyles: implicit, each, example
169+
RSpec/HookArgument:
170+
EnforcedStyle: each
171+
172+
# Offense count: 141
173+
# Configuration parameters: AssignmentOnly.
174+
RSpec/InstanceVariable:
175+
Exclude:
176+
- 'spec/lib/fine/ant_spec.rb'
177+
- 'spec/lib/fine/git_spec.rb'
178+
- 'spec/lib/fine/kit_package_spec.rb'
179+
- 'spec/lib/fine/kit_spec.rb'
180+
- 'spec/lib/fine/mvn_spec.rb'
181+
- 'spec/lib/fine/package_spec.rb'
182+
- 'spec/lib/fine/project_spec.rb'
183+
- 'spec/lib/fine/scriptable_spec.rb'
184+
- 'spec/lib/fine/speccable_spec.rb'
185+
186+
# Offense count: 1
187+
RSpec/LeakyConstantDeclaration:
188+
Exclude:
189+
- 'spec/lib/fine/speccable_spec.rb'
190+
191+
# Offense count: 48
192+
RSpec/MultipleExpectations:
193+
Max: 18
194+
195+
# Offense count: 20
196+
# This cop supports unsafe autocorrection (--autocorrect-all).
197+
# Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
198+
# SupportedStyles: inflected, explicit
199+
RSpec/PredicateMatcher:
200+
Exclude:
201+
- 'spec/lib/fine/maven_website_spec.rb'
202+
- 'spec/lib/fine/pom_getter_spec.rb'
203+
- 'spec/lib/fine/project_spec.rb'
204+
205+
# Offense count: 15
206+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
207+
# Include: **/*_spec.rb
208+
RSpec/SpecFilePathFormat:
209+
Exclude:
210+
- '**/spec/routing/**/*'
211+
- 'spec/lib/fine/ant_spec.rb'
212+
- 'spec/lib/fine/git_spec.rb'
213+
- 'spec/lib/fine/kit_package_spec.rb'
214+
- 'spec/lib/fine/kit_spec.rb'
215+
- 'spec/lib/fine/maven_website_spec.rb'
216+
- 'spec/lib/fine/mvn_spec.rb'
217+
- 'spec/lib/fine/package_spec.rb'
218+
- 'spec/lib/fine/pom_getter_spec.rb'
219+
- 'spec/lib/fine/pom_spec.rb'
220+
- 'spec/lib/fine/project_spec.rb'
221+
- 'spec/lib/fine/scriptable_spec.rb'
222+
- 'spec/lib/fine/speccable_spec.rb'
223+
- 'spec/lib/fine/tar_spec.rb'
224+
- 'spec/lib/fine/unzip_spec.rb'
225+
- 'spec/lib/fine/version_matcher_spec.rb'
226+
227+
# Offense count: 1
228+
# This cop supports safe autocorrection (--autocorrect).
229+
Rake/Desc:
230+
Exclude:
231+
- 'Rakefile'
232+
125233
# Offense count: 10
126234
# This cop supports safe autocorrection (--autocorrect).
127235
# Configuration parameters: EnforcedStyle.

Gemfile.lock

+6
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ GEM
105105
unicode-display_width (>= 2.4.0, < 4.0)
106106
rubocop-ast (1.37.0)
107107
parser (>= 3.3.1.0)
108+
rubocop-rake (0.6.0)
109+
rubocop (~> 1.0)
110+
rubocop-rspec (3.3.0)
111+
rubocop (~> 1.61)
108112
ruby-progressbar (1.13.0)
109113
rubyzip (2.3.2)
110114
simplecov (0.22.0)
@@ -138,6 +142,8 @@ DEPENDENCIES
138142
rake (~> 13.2.0)
139143
rspec (~> 3.13.0)
140144
rubocop (~> 1.69.1)
145+
rubocop-rake (~> 0.6.0)
146+
rubocop-rspec (~> 3.3.0)
141147
simplecov (~> 0.22.0)
142148
tetra!
143149

tetra.gemspec

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Gem::Specification.new do |s|
3131
s.add_development_dependency "rake", "~> 13.2.0"
3232
s.add_development_dependency "rspec", "~> 3.13.0"
3333
s.add_development_dependency "rubocop", "~> 1.69.1"
34+
s.add_development_dependency "rubocop-rake", "~> 0.6.0"
35+
s.add_development_dependency "rubocop-rspec", "~> 3.3.0"
3436

3537
s.add_runtime_dependency "clamp", "~> 1.3.2"
3638
s.add_runtime_dependency "erb", "~> 4.0.3"

0 commit comments

Comments
 (0)