makandra-rubocop 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac2a80be46429faeffc08189f86294681cd53d19181de509d9d45be86386f1bd
4
- data.tar.gz: 129bfa92a7b78d2eee7387b1c37b78ef484adc60c66d80fa76fc5154c56c5e18
3
+ metadata.gz: 8a7cdbf28583919844ce07f7a3b673c4ac05c54d3447d6429a32694ce416e27c
4
+ data.tar.gz: 679ddcdf724dc34fc3977325f0cbead423dc9646a27637eb651649f30ad01efe
5
5
  SHA512:
6
- metadata.gz: 24c65cf37064d47c3ef3c8b11f58998b5514ea88ef89bed03dc9a339382597baca9b255acdca61b5ac73decac6bf87bfc4634065718bf69fe4ac8d5b468f6712
7
- data.tar.gz: 88c12c6cc4f7262decb7b2ead3231e47d9576a5969860d5a8ae4989ca2f717872d625f67ee4ce90ec6ef8dfc3798c26e24062a52fcf295bc68765f7337f3a804
6
+ metadata.gz: '069adcfa323f8941a1c87ccfc6fdf43583ddc90090b2ba453faa8864c172a341a8fd7ce776fc6614061bf2838acd2421abf5bc3b4116af94d6b8faffca8b370e'
7
+ data.tar.gz: 26a172a36ff49e96980fe027dc32c880d8d836b1251b1c46c573ac879949fe2881c8eb15a026b1befb34892f0356db4950ebdf58d8fc7db58a02c604cda02bf9
@@ -9,6 +9,25 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
9
9
  ### Compatible changes
10
10
 
11
11
 
12
+ ## 5.1.0 - 2020-06-29
13
+
14
+ ### Breaking changes
15
+
16
+ ### Compatible changes
17
+
18
+ - Add [rubocop-rspec](https://github.com/rubocop-hq/rubocop-rspec)
19
+
20
+ You can add it to a project like this:
21
+
22
+ ```yaml
23
+ inherit_gem:
24
+ makandra-rubocop:
25
+ - config/default.yml
26
+ - config/ext/rspec.yml
27
+ ```
28
+ - Disable the `Style/ClassCheck` cop (#22)
29
+
30
+
12
31
  ## 5.0.0 - 2020-04-07
13
32
 
14
33
  ### Breaking changes
@@ -1,29 +1,30 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- makandra-rubocop (5.0.0)
4
+ makandra-rubocop (5.1.0)
5
5
  rubocop (~> 0.81.0)
6
6
  rubocop-rails (~> 2.5.1)
7
+ rubocop-rspec (~> 1.40.0)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- activesupport (6.0.2.2)
12
+ activesupport (6.0.3.2)
12
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
14
  i18n (>= 0.7, < 2)
14
15
  minitest (~> 5.1)
15
16
  tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2)
17
- ast (2.4.0)
17
+ zeitwerk (~> 2.2, >= 2.2.2)
18
+ ast (2.4.1)
18
19
  concurrent-ruby (1.1.6)
19
- i18n (1.8.2)
20
+ i18n (1.8.3)
20
21
  concurrent-ruby (~> 1.0)
21
22
  jaro_winkler (1.5.4)
22
- minitest (5.14.0)
23
- parallel (1.19.1)
24
- parser (2.7.1.0)
25
- ast (~> 2.4.0)
26
- rack (2.2.2)
23
+ minitest (5.14.1)
24
+ parallel (1.19.2)
25
+ parser (2.7.1.4)
26
+ ast (~> 2.4.1)
27
+ rack (2.2.3)
27
28
  rainbow (3.0.0)
28
29
  rake (12.3.2)
29
30
  rexml (3.2.4)
@@ -35,16 +36,18 @@ GEM
35
36
  rexml
36
37
  ruby-progressbar (~> 1.7)
37
38
  unicode-display_width (>= 1.4.0, < 2.0)
38
- rubocop-rails (2.5.1)
39
+ rubocop-rails (2.5.2)
39
40
  activesupport
40
41
  rack (>= 1.1)
41
42
  rubocop (>= 0.72.0)
43
+ rubocop-rspec (1.40.0)
44
+ rubocop (>= 0.68.1)
42
45
  ruby-progressbar (1.10.1)
43
46
  thread_safe (0.3.6)
44
47
  tzinfo (1.2.7)
45
48
  thread_safe (~> 0.1)
46
49
  unicode-display_width (1.7.0)
47
- zeitwerk (2.3.0)
50
+ zeitwerk (2.3.1)
48
51
 
49
52
  PLATFORMS
50
53
  ruby
data/README.md CHANGED
@@ -39,6 +39,15 @@ inherit_gem:
39
39
  - config/ext/rails.yml
40
40
  ```
41
41
 
42
+ **For RSpec**
43
+
44
+ ```yaml
45
+ inherit_gem:
46
+ makandra-rubocop:
47
+ - config/default.yml
48
+ - config/ext/rspec.yml
49
+ ```
50
+
42
51
  Any per-project rules can then be defined in the `.rubocop.yml`:
43
52
 
44
53
  ```yaml
@@ -2453,7 +2453,7 @@ Style/ClassAndModuleChildren:
2453
2453
 
2454
2454
  Style/ClassCheck:
2455
2455
  Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
2456
- Enabled: true
2456
+ Enabled: false # These methods are not the same, see https://github.com/makandra/makandra-rubocop/issues/22
2457
2457
  VersionAdded: '0.24'
2458
2458
  EnforcedStyle: is_a?
2459
2459
  SupportedStyles:
@@ -0,0 +1,641 @@
1
+ require:
2
+ - rubocop-rspec
3
+
4
+ inherit_mode:
5
+ merge:
6
+ - Exclude
7
+
8
+ AllCops:
9
+ RSpec:
10
+ Patterns:
11
+ - _spec.rb
12
+ - "(?:^|/)spec/"
13
+ RSpec/FactoryBot:
14
+ Patterns:
15
+ - spec/factories.rb
16
+ - spec/factories/**/*.rb
17
+ - features/support/factories/**/*.rb
18
+
19
+ RSpec/AlignLeftLetBrace:
20
+ Description: Checks that left braces for adjacent single line lets are aligned.
21
+ Enabled: false
22
+ VersionAdded: '1.16'
23
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignLeftLetBrace
24
+
25
+ RSpec/AlignRightLetBrace:
26
+ Description: Checks that right braces for adjacent single line lets are aligned.
27
+ Enabled: false
28
+ VersionAdded: '1.16'
29
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignRightLetBrace
30
+
31
+ RSpec/AnyInstance:
32
+ Description: Check that instances are not being stubbed globally.
33
+ Enabled: false # The example is good, but it does not work if you can not access the instance that needs to be stubbed
34
+ VersionAdded: '1.4'
35
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AnyInstance
36
+
37
+ RSpec/AroundBlock:
38
+ Description: Checks that around blocks actually run the test.
39
+ Enabled: true
40
+ VersionAdded: '1.11'
41
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AroundBlock
42
+
43
+ RSpec/Be:
44
+ Description: Check for expectations where `be` is used without argument.
45
+ Enabled: true
46
+ VersionAdded: '1.25'
47
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be
48
+
49
+ RSpec/BeEql:
50
+ Description: Check for expectations where `be(...)` can replace `eql(...)`.
51
+ Enabled: true
52
+ VersionAdded: '1.7'
53
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql
54
+
55
+ RSpec/BeforeAfterAll:
56
+ Description: Check that before/after(:all) isn't being used.
57
+ Enabled: true
58
+ Exclude:
59
+ - spec/spec_helper.rb
60
+ - spec/rails_helper.rb
61
+ - spec/support/**/*.rb
62
+ VersionAdded: '1.12'
63
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
64
+
65
+ RSpec/ContextMethod:
66
+ Description: "`context` should not be used for specifying methods."
67
+ Enabled: true
68
+ VersionAdded: '1.36'
69
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextMethod
70
+
71
+ RSpec/ContextWording:
72
+ Description: Checks that `context` docstring starts with an allowed prefix.
73
+ Enabled: false # It is nice to follow this approach but we do not want to enforce it
74
+ Prefixes:
75
+ - when
76
+ - with
77
+ - without
78
+ VersionAdded: '1.20'
79
+ VersionChanged: 1.20.1
80
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
81
+
82
+ RSpec/DescribeClass:
83
+ Description: Check that the first argument to the top level describe is a constant.
84
+ Enabled: false # It is nice to follow this approach but we do not want to enforce it
85
+ VersionAdded: '1.0'
86
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
87
+
88
+ RSpec/DescribeMethod:
89
+ Description: Checks that the second argument to `describe` specifies a method.
90
+ Enabled: true
91
+ VersionAdded: '1.0'
92
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeMethod
93
+
94
+ RSpec/DescribeSymbol:
95
+ Description: Avoid describing symbols.
96
+ Enabled: true
97
+ VersionAdded: '1.15'
98
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeSymbol
99
+
100
+ RSpec/DescribedClass:
101
+ Description: Checks that tests use `described_class`.
102
+ Enabled: true
103
+ SkipBlocks: false
104
+ EnforcedStyle: described_class
105
+ SupportedStyles:
106
+ - described_class
107
+ - explicit
108
+ SafeAutoCorrect: false
109
+ VersionAdded: '1.0'
110
+ VersionChanged: '1.11'
111
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
112
+
113
+ RSpec/DescribedClassModuleWrapping:
114
+ Description: Avoid opening modules and defining specs within them.
115
+ Enabled: false
116
+ VersionAdded: '1.37'
117
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClassModuleWrapping
118
+
119
+ RSpec/Dialect:
120
+ Description: This cop enforces custom RSpec dialects.
121
+ Enabled: false
122
+ PreferredMethods: {}
123
+ VersionAdded: '1.33'
124
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect
125
+
126
+ RSpec/EmptyExampleGroup:
127
+ Description: Checks if an example group does not include any tests.
128
+ Enabled: true
129
+ CustomIncludeMethods: []
130
+ VersionAdded: '1.7'
131
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
132
+
133
+ RSpec/EmptyHook:
134
+ Description: Checks for empty before and after hooks.
135
+ Enabled: true
136
+ VersionAdded: '1.39'
137
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook
138
+
139
+ RSpec/EmptyLineAfterExample:
140
+ Description: Checks if there is an empty line after example blocks.
141
+ Enabled: true
142
+ AllowConsecutiveOneLiners: true
143
+ VersionAdded: '1.36'
144
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExample
145
+
146
+ RSpec/EmptyLineAfterExampleGroup:
147
+ Description: Checks if there is an empty line after example group blocks.
148
+ Enabled: true
149
+ VersionAdded: '1.27'
150
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup
151
+
152
+ RSpec/EmptyLineAfterFinalLet:
153
+ Description: Checks if there is an empty line after the last let block.
154
+ Enabled: true
155
+ VersionAdded: '1.14'
156
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
157
+
158
+ RSpec/EmptyLineAfterHook:
159
+ Description: Checks if there is an empty line after hook blocks.
160
+ Enabled: true
161
+ VersionAdded: '1.27'
162
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterHook
163
+
164
+ RSpec/EmptyLineAfterSubject:
165
+ Description: Checks if there is an empty line after subject block.
166
+ Enabled: true
167
+ VersionAdded: '1.14'
168
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
169
+
170
+ RSpec/ExampleLength:
171
+ Description: Checks for long examples.
172
+ Enabled: false # We do not want to have such limitation
173
+ Max: 5
174
+ VersionAdded: '1.5'
175
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength
176
+
177
+ RSpec/ExampleWithoutDescription:
178
+ Description: Checks for examples without a description.
179
+ Enabled: true
180
+ EnforcedStyle: always_allow
181
+ SupportedStyles:
182
+ - always_allow
183
+ - single_line_only
184
+ - disallow
185
+ VersionAdded: '1.22'
186
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
187
+
188
+ RSpec/ExampleWording:
189
+ Description: Checks for common mistakes in example descriptions.
190
+ Enabled: true
191
+ CustomTransform:
192
+ be: is
193
+ BE: IS
194
+ have: has
195
+ HAVE: HAS
196
+ IgnoredWords: []
197
+ VersionAdded: '1.0'
198
+ VersionChanged: '1.2'
199
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
200
+
201
+ RSpec/ExpectActual:
202
+ Description: Checks for `expect(...)` calls containing literal values.
203
+ Enabled: true
204
+ Exclude:
205
+ - spec/routing/**/*
206
+ VersionAdded: '1.7'
207
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
208
+
209
+ RSpec/ExpectChange:
210
+ Description: Checks for consistent style of change matcher.
211
+ Enabled: true
212
+ EnforcedStyle: method_call
213
+ SupportedStyles:
214
+ - method_call
215
+ - block
216
+ VersionAdded: '1.22'
217
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
218
+
219
+ RSpec/ExpectInHook:
220
+ Description: Do not use `expect` in hooks such as `before`.
221
+ Enabled: false # Maybe we want to change this in the future, currently we use this if a expectation is the same for multiple examples (e.g the response of a http response)
222
+ VersionAdded: '1.16'
223
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook
224
+
225
+ RSpec/ExpectOutput:
226
+ Description: Checks for opportunities to use `expect { ... }.to output`.
227
+ Enabled: true
228
+ VersionAdded: '1.10'
229
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput
230
+
231
+ RSpec/FilePath:
232
+ Description: Checks that spec file paths are consistent and well-formed.
233
+ Enabled: true
234
+ CustomTransform:
235
+ RuboCop: rubocop
236
+ RSpec: rspec
237
+ IgnoreMethods: false
238
+ SpecSuffixOnly: false
239
+ VersionAdded: '1.2'
240
+ VersionChanged: '1.40'
241
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath
242
+
243
+ RSpec/Focus:
244
+ Description: Checks if examples are focused.
245
+ Enabled: true
246
+ VersionAdded: '1.5'
247
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
248
+
249
+ RSpec/HookArgument:
250
+ Description: Checks the arguments passed to `before`, `around`, and `after`.
251
+ Enabled: true
252
+ EnforcedStyle: implicit
253
+ SupportedStyles:
254
+ - implicit
255
+ - each
256
+ - example
257
+ VersionAdded: '1.7'
258
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
259
+
260
+ RSpec/HooksBeforeExamples:
261
+ Description: Checks for before/around/after hooks that come after an example.
262
+ Enabled: true
263
+ VersionAdded: '1.29'
264
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
265
+
266
+ RSpec/ImplicitBlockExpectation:
267
+ Description: Check that implicit block expectation syntax is not used.
268
+ Enabled: true
269
+ VersionAdded: '1.35'
270
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitBlockExpectation
271
+
272
+ RSpec/ImplicitExpect:
273
+ Description: Check that a consistent implicit expectation style is used.
274
+ Enabled: true
275
+ EnforcedStyle: is_expected
276
+ SupportedStyles:
277
+ - is_expected
278
+ - should
279
+ VersionAdded: '1.8'
280
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
281
+
282
+ RSpec/ImplicitSubject:
283
+ Description: Checks for usage of implicit subject (`is_expected` / `should`).
284
+ Enabled: true # Maybe we want to change this to false in the future
285
+ EnforcedStyle: single_line_only
286
+ SupportedStyles:
287
+ - single_line_only
288
+ - single_statement_only
289
+ - disallow
290
+ VersionAdded: '1.29'
291
+ VersionChanged: '1.30'
292
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
293
+
294
+ RSpec/InstanceSpy:
295
+ Description: Checks for `instance_double` used with `have_received`.
296
+ Enabled: true
297
+ VersionAdded: '1.12'
298
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceSpy
299
+
300
+ RSpec/InstanceVariable:
301
+ Description: Checks for instance variable usage in specs.
302
+ Enabled: false # It's good to prefer let over an instance variable. But there are legit cases for instance variables.
303
+ AssignmentOnly: false
304
+ VersionAdded: '1.0'
305
+ VersionChanged: '1.7'
306
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable
307
+
308
+ RSpec/InvalidPredicateMatcher:
309
+ Description: Checks invalid usage for predicate matcher.
310
+ Enabled: true
311
+ VersionAdded: '1.16'
312
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher
313
+
314
+ RSpec/ItBehavesLike:
315
+ Description: Checks that only one `it_behaves_like` style is used.
316
+ Enabled: true
317
+ EnforcedStyle: it_behaves_like
318
+ SupportedStyles:
319
+ - it_behaves_like
320
+ - it_should_behave_like
321
+ VersionAdded: '1.13'
322
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
323
+
324
+ RSpec/IteratedExpectation:
325
+ Description: Check that `all` matcher is used instead of iterating over an array.
326
+ Enabled: true
327
+ VersionAdded: '1.14'
328
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
329
+
330
+ RSpec/LeadingSubject:
331
+ Description: Enforce that subject is the first definition in the test.
332
+ Enabled: false # We don't do this
333
+ VersionAdded: '1.7'
334
+ VersionChanged: '1.14'
335
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeadingSubject
336
+
337
+ RSpec/LeakyConstantDeclaration:
338
+ Description: Checks that no class, module, or constant is declared.
339
+ Enabled: true
340
+ VersionAdded: '1.35'
341
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration
342
+
343
+ RSpec/LetBeforeExamples:
344
+ Description: Checks for `let` definitions that come after an example.
345
+ Enabled: true
346
+ VersionAdded: '1.16'
347
+ VersionChanged: '1.22'
348
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
349
+
350
+ RSpec/LetSetup:
351
+ Description: Checks unreferenced `let!` calls being used for test setup.
352
+ Enabled: true
353
+ VersionAdded: '1.7'
354
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
355
+
356
+ RSpec/MessageChain:
357
+ Description: Check that chains of messages are not being stubbed.
358
+ Enabled: true
359
+ VersionAdded: '1.7'
360
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageChain
361
+
362
+ RSpec/MessageExpectation:
363
+ Description: Checks for consistent message expectation style.
364
+ Enabled: false
365
+ EnforcedStyle: allow
366
+ SupportedStyles:
367
+ - allow
368
+ - expect
369
+ VersionAdded: '1.7'
370
+ VersionChanged: '1.8'
371
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
372
+
373
+ RSpec/MessageSpies:
374
+ Description: Checks that message expectations are set using spies.
375
+ Enabled: true
376
+ EnforcedStyle: receive # We usually use receive as it is defined before the expectation line and not after
377
+ SupportedStyles:
378
+ - have_received
379
+ - receive
380
+ VersionAdded: '1.9'
381
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
382
+
383
+ RSpec/MissingExampleGroupArgument:
384
+ Description: Checks that the first argument to an example group is not empty.
385
+ Enabled: true
386
+ VersionAdded: '1.28'
387
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument
388
+
389
+ RSpec/MultipleDescribes:
390
+ Description: Checks for multiple top level describes.
391
+ Enabled: true
392
+ VersionAdded: '1.0'
393
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleDescribes
394
+
395
+ RSpec/MultipleExpectations:
396
+ Description: Checks if examples contain too many `expect` calls.
397
+ Enabled: false # We do not want to have such limitation
398
+ Max: 1
399
+ VersionAdded: '1.7'
400
+ VersionChanged: '1.21'
401
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations
402
+
403
+ RSpec/MultipleSubjects:
404
+ Description: Checks if an example group defines `subject` multiple times.
405
+ Enabled: true
406
+ VersionAdded: '1.16'
407
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleSubjects
408
+
409
+ RSpec/NamedSubject:
410
+ Description: Checks for explicitly referenced test subjects.
411
+ Enabled: true # Usually this is a good pattern, but maybe we have to disable this in the future
412
+ IgnoreSharedExamples: true
413
+ VersionAdded: 1.5.3
414
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject
415
+
416
+ RSpec/NestedGroups:
417
+ Description: Checks for nested example groups.
418
+ Enabled: false # We do not want to have such limitation
419
+ Max: 3
420
+ VersionAdded: '1.7'
421
+ VersionChanged: '1.10'
422
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups
423
+
424
+ RSpec/NotToNot:
425
+ Description: Checks for consistent method usage for negating expectations.
426
+ Enabled: true
427
+ EnforcedStyle: not_to
428
+ SupportedStyles:
429
+ - not_to
430
+ - to_not
431
+ VersionAdded: '1.4'
432
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
433
+
434
+ RSpec/OverwritingSetup:
435
+ Description: Checks if there is a let/subject that overwrites an existing one.
436
+ Enabled: true # This would break tests, but it's worth the effort
437
+ VersionAdded: '1.14'
438
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/OverwritingSetup
439
+
440
+ RSpec/Pending:
441
+ Description: Checks for any pending or skipped examples.
442
+ Enabled: false
443
+ VersionAdded: '1.25'
444
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending
445
+
446
+ RSpec/PredicateMatcher:
447
+ Description: Prefer using predicate matcher over using predicate method directly.
448
+ Enabled: true # Maybe we need to remove this in the future
449
+ Strict: true
450
+ EnforcedStyle: inflected
451
+ AllowedExplicitMatchers: []
452
+ SupportedStyles:
453
+ - inflected
454
+ - explicit
455
+ SafeAutoCorrect: false
456
+ VersionAdded: '1.16'
457
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
458
+
459
+ RSpec/ReceiveCounts:
460
+ Description: Check for `once` and `twice` receive counts matchers usage.
461
+ Enabled: true
462
+ VersionAdded: '1.26'
463
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts
464
+
465
+ RSpec/ReceiveNever:
466
+ Description: Prefer `not_to receive(...)` over `receive(...).never`.
467
+ Enabled: true
468
+ VersionAdded: '1.28'
469
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever
470
+
471
+ RSpec/RepeatedDescription:
472
+ Description: Check for repeated description strings in example groups.
473
+ Enabled: true
474
+ VersionAdded: '1.9'
475
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription
476
+
477
+ RSpec/RepeatedExample:
478
+ Description: Check for repeated examples within example groups.
479
+ Enabled: true
480
+ VersionAdded: '1.10'
481
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample
482
+
483
+ RSpec/RepeatedExampleGroupBody:
484
+ Description: Check for repeated describe and context block body.
485
+ Enabled: true
486
+ VersionAdded: '1.38'
487
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupBody
488
+
489
+ RSpec/RepeatedExampleGroupDescription:
490
+ Description: Check for repeated example group descriptions.
491
+ Enabled: true
492
+ VersionAdded: '1.38'
493
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupDescription
494
+
495
+ RSpec/ReturnFromStub:
496
+ Description: Checks for consistent style of stub's return setting.
497
+ Enabled: true
498
+ EnforcedStyle: and_return
499
+ SupportedStyles:
500
+ - and_return
501
+ - block
502
+ VersionAdded: '1.16'
503
+ VersionChanged: '1.22'
504
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
505
+
506
+ RSpec/ScatteredLet:
507
+ Description: Checks for let scattered across the example group.
508
+ Enabled: true
509
+ VersionAdded: '1.14'
510
+ VersionChanged: '1.39'
511
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
512
+
513
+ RSpec/ScatteredSetup:
514
+ Description: Checks for setup scattered across multiple hooks in an example group.
515
+ Enabled: true
516
+ VersionAdded: '1.10'
517
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
518
+
519
+ RSpec/SharedContext:
520
+ Description: Checks for proper shared_context and shared_examples usage.
521
+ Enabled: true
522
+ VersionAdded: '1.13'
523
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext
524
+
525
+ RSpec/SharedExamples:
526
+ Description: Enforces use of string to titleize shared examples.
527
+ Enabled: true
528
+ VersionAdded: '1.25'
529
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples
530
+
531
+ RSpec/SingleArgumentMessageChain:
532
+ Description: Checks that chains of messages contain more than one element.
533
+ Enabled: true
534
+ VersionAdded: '1.9'
535
+ VersionChanged: '1.10'
536
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
537
+
538
+ RSpec/SubjectStub:
539
+ Description: Checks for stubbed test subjects.
540
+ Enabled: true
541
+ VersionAdded: '1.7'
542
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub
543
+
544
+ RSpec/UnspecifiedException:
545
+ Description: Checks for a specified error in checking raised errors.
546
+ Enabled: true
547
+ VersionAdded: '1.30'
548
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UnspecifiedException
549
+
550
+ RSpec/VariableDefinition:
551
+ Description: Checks that memoized helpers names are symbols or strings.
552
+ Enabled: true
553
+ EnforcedStyle: symbols
554
+ SupportedStyles:
555
+ - symbols
556
+ - strings
557
+ VersionAdded: '1.40'
558
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition
559
+
560
+ RSpec/VariableName:
561
+ Description: Checks that memoized helper names use the configured style.
562
+ Enabled: true
563
+ EnforcedStyle: snake_case
564
+ SupportedStyles:
565
+ - snake_case
566
+ - camelCase
567
+ VersionAdded: '1.40'
568
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableName
569
+
570
+ RSpec/VerifiedDoubles:
571
+ Description: Prefer using verifying doubles over normal doubles.
572
+ Enabled: true
573
+ IgnoreNameless: true
574
+ IgnoreSymbolicNames: false
575
+ VersionAdded: 1.2.1
576
+ VersionChanged: '1.5'
577
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles
578
+
579
+ RSpec/VoidExpect:
580
+ Description: This cop checks void `expect()`.
581
+ Enabled: true
582
+ VersionAdded: '1.16'
583
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VoidExpect
584
+
585
+ RSpec/Yield:
586
+ Description: This cop checks for calling a block within a stub.
587
+ Enabled: true
588
+ VersionAdded: '1.32'
589
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
590
+
591
+ Capybara/CurrentPathExpectation:
592
+ Description: Checks that no expectations are set on Capybara's `current_path`.
593
+ Enabled: true
594
+ VersionAdded: '1.18'
595
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation
596
+
597
+ Capybara/FeatureMethods:
598
+ Description: Checks for consistent method usage in feature specs.
599
+ Enabled: true
600
+ EnabledMethods: []
601
+ VersionAdded: '1.17'
602
+ VersionChanged: '1.25'
603
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
604
+
605
+ Capybara/VisibilityMatcher:
606
+ Description: Checks for boolean visibility in capybara finders.
607
+ Enabled: true
608
+ VersionAdded: '1.39'
609
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher
610
+
611
+ FactoryBot/AttributeDefinedStatically:
612
+ Description: Always declare attribute values as blocks.
613
+ Enabled: true
614
+ VersionAdded: '1.28'
615
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
616
+
617
+ FactoryBot/CreateList:
618
+ Description: Checks for create_list usage.
619
+ Enabled: true
620
+ EnforcedStyle: create_list
621
+ SupportedStyles:
622
+ - create_list
623
+ - n_times
624
+ VersionAdded: '1.25'
625
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
626
+
627
+ FactoryBot/FactoryClassName:
628
+ Description: Use string value when setting the class attribute explicitly.
629
+ Enabled: true
630
+ VersionAdded: '1.37'
631
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
632
+
633
+ Rails/HttpStatus:
634
+ Description: Enforces use of symbolic or numeric value to describe HTTP status.
635
+ Enabled: false # This should not be enforced
636
+ EnforcedStyle: symbolic
637
+ SupportedStyles:
638
+ - numeric
639
+ - symbolic
640
+ VersionAdded: '1.23'
641
+ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus
@@ -1,3 +1,3 @@
1
1
  module MakandraRubocop
2
- VERSION = '5.0.0'.freeze
2
+ VERSION = '5.1.0'.freeze
3
3
  end
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_dependency 'rubocop', '~> 0.81.0'
27
27
  spec.add_dependency 'rubocop-rails', '~> 2.5.1'
28
+ spec.add_dependency 'rubocop-rspec', '~> 1.40.0'
28
29
 
29
30
  spec.add_development_dependency 'bundler', '~> 2.0'
30
31
  spec.add_development_dependency 'rake', '~> 12.3'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makandra-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Hartherz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-04-07 00:00:00.000000000 Z
12
+ date: 2020-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -39,6 +39,20 @@ dependencies:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: 2.5.1
42
+ - !ruby/object:Gem::Dependency
43
+ name: rubocop-rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 1.40.0
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 1.40.0
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: bundler
44
58
  requirement: !ruby/object:Gem::Requirement
@@ -88,6 +102,7 @@ files:
88
102
  - bin/setup
89
103
  - config/default.yml
90
104
  - config/ext/rails.yml
105
+ - config/ext/rspec.yml
91
106
  - lib/makandra_rubocop.rb
92
107
  - lib/makandra_rubocop/support/rubocop_spec.rb
93
108
  - lib/makandra_rubocop/version.rb
@@ -111,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
126
  - !ruby/object:Gem::Version
112
127
  version: '0'
113
128
  requirements: []
114
- rubygems_version: 3.1.2
129
+ rubygems_version: 3.0.8
115
130
  signing_key:
116
131
  specification_version: 4
117
132
  summary: makandra's default Rubocop configuration