kuyio-rubocop 0.1.5 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/rubocop-style.yml ADDED
@@ -0,0 +1,464 @@
1
+ ---
2
+ # Checks for grouping of accessors in class and module bodies.
3
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleaccessorgrouping
4
+ Style/AccessorGrouping:
5
+ Enabled: true
6
+
7
+ # Use alias_method instead of alias.
8
+ Style/Alias:
9
+ EnforcedStyle: prefer_alias_method
10
+ Enabled: true
11
+
12
+ # Whether `and` and `or` are banned only in conditionals (conditionals)
13
+ # or completely (always).
14
+ Style/AndOr:
15
+ Enabled: true
16
+ EnforcedStyle: always
17
+
18
+ # This cop enforces the use of Array() instead of explicit Array check or [*var]
19
+ # It must remain disabled because of safety concern on Array().
20
+ # A false positive may occur depending on how the argument is handled by Array()
21
+ # (which can be different than just wrapping the argument in an array)
22
+ # As of Rubocop 1.0, this cop has been disabled by default.
23
+ # https://docs.rubocop.org/rubocop/1.44/cops_style.html#safety-3
24
+ Style/ArrayCoercion:
25
+ Enabled: false
26
+
27
+ # Use `Array#join` instead of `Array#*`.
28
+ Style/ArrayJoin:
29
+ Enabled: true
30
+
31
+ # Use only ascii symbols in comments.
32
+ Style/AsciiComments:
33
+ Enabled: true
34
+
35
+ # Checks for uses of Module#attr.
36
+ Style/Attr:
37
+ Enabled: true
38
+
39
+ # Avoid the use of BEGIN blocks.
40
+ Style/BeginBlock:
41
+ Enabled: true
42
+
43
+ # Checks for places where attr_reader and attr_writer for the same method can be combined into single attr_accessor.
44
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#stylebisectedattraccessor
45
+ Style/BisectedAttrAccessor:
46
+ Enabled: true
47
+
48
+ # Do not use block comments.
49
+ Style/BlockComments:
50
+ Enabled: true
51
+
52
+ # Avoid using {...} for multi-line blocks (multi-line chaining is always ugly).
53
+ # Prefer {...} over do...end for single-line blocks.
54
+ Style/BlockDelimiters:
55
+ Enabled: true
56
+ # Do flag `it {` in multi-line blocks. Off by default.
57
+ AllowedMethods:
58
+ - proc
59
+ - lambda
60
+
61
+ # Checks for uses of the case equality operator(===).
62
+ Style/CaseEquality:
63
+ Enabled: false
64
+
65
+ # Identifies places where if-elsif constructions can be replaced with case-when.
66
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#stylecaselikeif
67
+ Style/CaseLikeIf:
68
+ Enabled: true
69
+
70
+ # Checks for uses of character literals.
71
+ Style/CharacterLiteral:
72
+ Enabled: true
73
+
74
+ # Checks style of children classes and modules.
75
+ Style/ClassAndModuleChildren:
76
+ Enabled: false
77
+
78
+ # Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
79
+ Style/ClassCheck:
80
+ Enabled: true
81
+
82
+ # Use self when defining module/class methods.
83
+ Style/ClassMethods:
84
+ Enabled: true
85
+
86
+ # Avoid the use of class variables.
87
+ Style/ClassVars:
88
+ Enabled: true
89
+
90
+ # This cop checks for methods invoked via the :: operator instead
91
+ # of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).
92
+ Style/ColonMethodCall:
93
+ Enabled: true
94
+
95
+ Style/CombinableLoops: # (new in 0.90)
96
+ Enabled: true
97
+
98
+ # This cop checks that comment annotation keywords are written according
99
+ # to guidelines.
100
+ Style/CommentAnnotation:
101
+ Enabled: false
102
+
103
+ # Check for `if` and `case` statements where each branch is used for
104
+ # assignment to the same variable when using the return of the
105
+ # condition can be used instead.
106
+ Style/ConditionalAssignment:
107
+ Enabled: true
108
+
109
+ # Use def with parentheses when there are arguments.
110
+ Style/DefWithParentheses:
111
+ Enabled: true
112
+
113
+ # Document classes and non-namespace modules.
114
+ Style/Documentation:
115
+ Enabled: false
116
+
117
+ # This cop checks for uses of double negation (!!) to convert something
118
+ # to a boolean value. As this is both cryptic and usually redundant, it
119
+ # should be avoided.
120
+ Style/DoubleNegation:
121
+ Enabled: false
122
+
123
+ # Avoid the use of END blocks.
124
+ Style/EndBlock:
125
+ Enabled: true
126
+
127
+ # Favor the use of Fixnum#even? && Fixnum#odd?
128
+ Style/EvenOdd:
129
+ Enabled: true
130
+
131
+ # Reason: Using `yield` is ~20% faster than `&block`.
132
+ # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94090#note_1452639709
133
+ Style/ExplicitBlockArgument:
134
+ Enabled: false
135
+
136
+ # Enforces consistency when using exponential notation for numbers in the code
137
+ Style/ExponentialNotation:
138
+ Enabled: true
139
+
140
+ # Checks use of for or each in multiline loops.
141
+ Style/For:
142
+ Enabled: true
143
+
144
+ # Use a consistent style for format string tokens.
145
+ Style/FormatStringToken:
146
+ Enabled: false
147
+
148
+ # Checks if there is a magic comment to enforce string literals
149
+ Style/FrozenStringLiteralComment:
150
+ Enabled: true
151
+
152
+ # Enforces the use of $stdout/$stderr/$stdin instead of STDOUT/STDERR/STDIN. STDOUT/STDERR/STDIN are constants,
153
+ # and while you can actually reassign (possibly to redirect some stream) constants in Ruby,
154
+ # you’ll get an interpreter warning if you do so.
155
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleglobalstdstream
156
+ Style/GlobalStdStream:
157
+ Enabled: true
158
+
159
+ # Do not introduce global variables.
160
+ Style/GlobalVars:
161
+ Enabled: true
162
+ Exclude:
163
+ - 'lib/backup/**/*'
164
+ - 'lib/tasks/**/*'
165
+
166
+ # Checks for presence or absence of braces around hash literal as a last array item depending on configuration.
167
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#stylehashaslastarrayitem
168
+ Style/HashAsLastArrayItem:
169
+ Enabled: true
170
+
171
+ # Checks for uses of each_key and each_value Hash methods.
172
+ Style/HashEachMethods:
173
+ Enabled: true
174
+
175
+ # Checks for places where case-when represents a simple 1:1 mapping and can be replaced with a hash lookup.
176
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#stylehashlikecase
177
+ Style/HashLikeCase:
178
+ Enabled: false
179
+
180
+ # Prefer Ruby 1.9 hash syntax `{ a: 1, b: 2 }`
181
+ # over 1.8 syntax `{ :a => 1, :b => 2 }`.
182
+ Style/HashSyntax:
183
+ Enabled: true
184
+
185
+ # looks for uses of _.each_with_object({}) {...}, _.map {...}.to_h, and Hash[_.map {...}]
186
+ # that are actually just transforming the keys of a hash, and tries to use a simpler & faster
187
+ # call to transform_keys instead.
188
+ Style/HashTransformKeys:
189
+ Enabled: true
190
+
191
+ # looks for uses of _.each_with_object({}) {...}, _.map {...}.to_h, and Hash[_.map {...}]
192
+ # that are actually just transforming the values of a hash, and tries to use a simpler & faster
193
+ # call to transform_values instead.
194
+ Style/HashTransformValues:
195
+ Enabled: true
196
+
197
+ # Checks that conditional statements do not have an identical line at the
198
+ # end of each branch, which can validly be moved out of the conditional.
199
+ Style/IdenticalConditionalBranches:
200
+ Enabled: true
201
+
202
+ # Do not use if x; .... Use the ternary operator instead.
203
+ Style/IfWithSemicolon:
204
+ Enabled: true
205
+
206
+ # Use Kernel#loop for infinite loops.
207
+ Style/InfiniteLoop:
208
+ Enabled: true
209
+
210
+ # Use the inverse method instead of `!.method`
211
+ # if an inverse method is defined.
212
+ Style/InverseMethods:
213
+ Enabled: false
214
+
215
+ Style/KeywordParametersOrder: # (new in 0.90)
216
+ Enabled: true
217
+
218
+ # Use lambda.call(...) instead of lambda.(...).
219
+ Style/LambdaCall:
220
+ Enabled: true
221
+
222
+ # Checks for places where keyword arguments can be used instead of boolean arguments when defining methods.
223
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleoptionalbooleanparameter
224
+ Style/OptionalBooleanParameter:
225
+ Enabled: false
226
+
227
+ # Use `strip` instead of `lstrip.rstrip`.
228
+ Style/Strip:
229
+ Enabled: true
230
+
231
+ # Checks if the method definitions have or don't have parentheses.
232
+ Style/MethodDefParentheses:
233
+ Enabled: true
234
+
235
+ # Checks for usage of `extend self` in modules.
236
+ Style/ModuleFunction:
237
+ Enabled: false
238
+
239
+ # Avoid multi-line chains of blocks.
240
+ Style/MultilineBlockChain:
241
+ Enabled: true
242
+
243
+ # Do not use then for multi-line if/unless.
244
+ Style/MultilineIfThen:
245
+ Enabled: true
246
+
247
+ # Avoid multi-line `? :` (the ternary operator), use if/unless instead.
248
+ Style/MultilineTernaryOperator:
249
+ Enabled: true
250
+
251
+ # Avoid comparing a variable with multiple items in a conditional,
252
+ # use Array#include? instead.
253
+ Style/MultipleComparison:
254
+ Enabled: false
255
+
256
+ # This cop checks whether some constant value isn't a
257
+ # mutable literal (e.g. array or hash).
258
+ Style/MutableConstant:
259
+ Enabled: true
260
+ Exclude:
261
+ - 'db/migrate/**/*'
262
+ - 'db/post_migrate/**/*'
263
+ - 'db/geo/migrate/**/*'
264
+
265
+ # Favor unless over if for negative conditions (or control flow or).
266
+ Style/NegatedIf:
267
+ Enabled: true
268
+
269
+ # Avoid using nested modifiers.
270
+ Style/NestedModifier:
271
+ Enabled: true
272
+
273
+ # Use one expression per branch in a ternary operator.
274
+ Style/NestedTernaryOperator:
275
+ Enabled: true
276
+
277
+ # Prefer x.nil? to x == nil.
278
+ Style/NilComparison:
279
+ Enabled: true
280
+
281
+ # Checks for redundant nil checks.
282
+ Style/NonNilCheck:
283
+ Enabled: true
284
+
285
+ # Use ! instead of not.
286
+ Style/Not:
287
+ Enabled: true
288
+
289
+ # Checks for numbered parameters. It can either restrict the use of numbered
290
+ # parameters to single-lined blocks, or disallow completely numbered
291
+ # parameters.
292
+ Style/NumberedParameters:
293
+ EnforcedStyle: disallow
294
+ Enabled: true
295
+
296
+ # Detects use of an excessive amount of numbered parameters in a single block.
297
+ Style/NumberedParametersLimit:
298
+ Enabled: false
299
+
300
+ # Add underscores to large numeric literals to improve their readability.
301
+ Style/NumericLiterals:
302
+ Enabled: false
303
+
304
+ # Favor the ternary operator(?:) over if/then/else/end constructs.
305
+ Style/OneLineConditional:
306
+ Enabled: true
307
+
308
+ # Do not use OpenStruct.
309
+ Style/OpenStructUse:
310
+ Enabled: true
311
+
312
+ # Don't use parentheses around the condition of an if/unless/while.
313
+ Style/ParenthesesAroundCondition:
314
+ Enabled: true
315
+
316
+ # This cop (by default) checks for uses of methods Hash#has_key? and
317
+ # Hash#has_value? where it enforces Hash#key? and Hash#value?
318
+ # It is configurable to enforce the inverse, using `verbose` method
319
+ # names also.
320
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
321
+ # SupportedStyles: short, verbose
322
+ Style/PreferredHashMethods:
323
+ Enabled: false
324
+
325
+ # Checks for %W when interpolation is not needed.
326
+ Style/RedundantCapitalW:
327
+ Enabled: true
328
+
329
+ # Checks for redundant assignment before returning.
330
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleredundantassignment
331
+ Style/RedundantAssignment:
332
+ Enabled: true
333
+
334
+ # Checks for an obsolete RuntimeException argument in raise/fail.
335
+ Style/RedundantException:
336
+ Enabled: true
337
+
338
+ # Identifies places where fetch(key) { value } can be replaced by fetch(key, value).
339
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleredundantfetchblock
340
+ Style/RedundantFetchBlock:
341
+ Enabled: true
342
+
343
+ # Checks for the presence of superfluous .rb extension in the filename provided to require and require_relative.
344
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleredundantfileextensioninrequire
345
+ Style/RedundantFileExtensionInRequire:
346
+ Enabled: true
347
+
348
+ # Checks for parentheses that seem not to serve any purpose.
349
+ Style/RedundantParentheses:
350
+ Enabled: true
351
+
352
+ # Checks for %q/%Q when single quotes or double quotes would do.
353
+ Style/RedundantPercentQ:
354
+ Enabled: false
355
+
356
+ # Checks for unnecessary single-element Regexp character classes.
357
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleredundantregexpcharacterclass
358
+ Style/RedundantRegexpCharacterClass:
359
+ Enabled: true
360
+
361
+ # Checks for redundant escapes inside Regexp literals.
362
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleredundantregexpescape
363
+ Style/RedundantRegexpEscape:
364
+ Enabled: true
365
+
366
+ Style/RedundantSelfAssignment: # (new in 0.90)
367
+ Enabled: true
368
+
369
+ # Use `sort` instead of `sort_by { |x| x }`.
370
+ Style/RedundantSortBy:
371
+ Enabled: true
372
+
373
+ # Don't use semicolons to terminate expressions.
374
+ Style/Semicolon:
375
+ Enabled: true
376
+
377
+ # Sometimes using dig method ends up with just a single argument. In such cases, dig should be replaced with [].
378
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#stylesingleargumentdig
379
+ Style/SingleArgumentDig:
380
+ Enabled: true
381
+
382
+ # Checks for proper usage of fail and raise.
383
+ Style/SignalException:
384
+ EnforcedStyle: only_raise
385
+ Enabled: true
386
+
387
+ # Checks that arrays are sliced with endless ranges instead of ary[start..-1] on Ruby 2.6+.
388
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#styleslicingwithrange
389
+ Style/SlicingWithRange:
390
+ Enabled: true
391
+
392
+ Style/SoleNestedConditional: # (new in 0.89)
393
+ Enabled: true
394
+
395
+ # Check for the usage of parentheses around stabby lambda arguments.
396
+ Style/StabbyLambdaParentheses:
397
+ EnforcedStyle: require_parentheses
398
+ Enabled: true
399
+
400
+ # Checks for places where string concatenation can be replaced with string interpolation.
401
+ # https://docs.rubocop.org/rubocop/0.89/cops_style.html#stylestringconcatenation
402
+ Style/StringConcatenation:
403
+ Enabled: true
404
+
405
+ # Checks if uses of quotes match the configured preference.
406
+ Style/StringLiterals:
407
+ Enabled: false
408
+
409
+ # Checks if configured preferred methods are used over non-preferred.
410
+ Style/StringMethods:
411
+ PreferredMethods:
412
+ intern: to_sym
413
+ Enabled: true
414
+
415
+ # Use %i or %I for arrays of symbols.
416
+ Style/SymbolArray:
417
+ Enabled: false
418
+
419
+ # This cop checks for trailing comma in array literals.
420
+ Style/TrailingCommaInArrayLiteral:
421
+ Enabled: true
422
+ EnforcedStyleForMultiline: no_comma
423
+
424
+ # This cop checks for trailing comma in hash literals.
425
+ Style/TrailingCommaInHashLiteral:
426
+ Enabled: true
427
+ EnforcedStyleForMultiline: no_comma
428
+
429
+ # This cop checks for trailing comma in argument lists.
430
+ Style/TrailingCommaInArguments:
431
+ Enabled: true
432
+ EnforcedStyleForMultiline: no_comma
433
+
434
+ # Don't interpolate global, instance and class variables directly in strings.
435
+ Style/VariableInterpolation:
436
+ Enabled: true
437
+
438
+ # Use when x then ... for one-line cases.
439
+ Style/WhenThen:
440
+ Enabled: true
441
+
442
+ # Checks for redundant do after while or until.
443
+ Style/WhileUntilDo:
444
+ Enabled: true
445
+
446
+ # Favor modifier while/until usage when you have a single-line body.
447
+ Style/WhileUntilModifier:
448
+ Enabled: true
449
+
450
+ # Use %w or %W for arrays of words.
451
+ Style/WordArray:
452
+ Enabled: true
453
+
454
+ # Do not use literals as the first operand of a comparison.
455
+ Style/YodaCondition:
456
+ Enabled: false
457
+
458
+ # Use `proc` instead of `Proc.new`.
459
+ Style/Proc:
460
+ Enabled: true
461
+
462
+ # Prefer `var, _ = call` over `var, = call`
463
+ Style/TrailingUnderscoreVariable:
464
+ Enabled: false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuyio-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - KUY.io Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-08 00:00:00.000000000 Z
11
+ date: 2023-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.4'
19
+ version: 1.50.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.4'
26
+ version: 1.50.2
27
27
  - !ruby/object:Gem::Dependency
28
- name: rubocop-rspec
28
+ name: rubocop-performance
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.19'
33
+ version: 1.15.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.19'
40
+ version: 1.15.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.18'
47
+ version: 2.17.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.18'
54
+ version: 2.17.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: rubocop-performance
56
+ name: rubocop-rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.16'
61
+ version: 2.22.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.16'
68
+ version: 2.22.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: brakeman
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '13.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.6'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.6'
111
125
  description:
112
126
  email:
113
127
  - dev@kuy.io
@@ -123,10 +137,22 @@ files:
123
137
  - RELEASING.md
124
138
  - Rakefile
125
139
  - bin/release
126
- - default.yml
127
140
  - kuyio-rubocop.gemspec
128
141
  - lib/kuyio/rubocop.rb
129
142
  - lib/kuyio/rubocop/version.rb
143
+ - rubocop-all.yml
144
+ - rubocop-bundler.yml
145
+ - rubocop-default.yml
146
+ - rubocop-gemspec.yml
147
+ - rubocop-layout.yml
148
+ - rubocop-lint.yml
149
+ - rubocop-metrics.yml
150
+ - rubocop-naming.yml
151
+ - rubocop-performance.yml
152
+ - rubocop-rails.yml
153
+ - rubocop-rspec.yml
154
+ - rubocop-security.yml
155
+ - rubocop-style.yml
130
156
  homepage: https://github.com/kuyio/kuyio-rubocop
131
157
  licenses:
132
158
  - MIT
@@ -140,14 +166,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
166
  requirements:
141
167
  - - ">="
142
168
  - !ruby/object:Gem::Version
143
- version: '0'
169
+ version: '2.6'
144
170
  required_rubygems_version: !ruby/object:Gem::Requirement
145
171
  requirements:
146
172
  - - ">="
147
173
  - !ruby/object:Gem::Version
148
174
  version: '0'
149
175
  requirements: []
150
- rubygems_version: 3.4.1
176
+ rubygems_version: 3.4.18
151
177
  signing_key:
152
178
  specification_version: 4
153
179
  summary: KUY.io shared rubocop configuration.