sequra-style 1.7.0 → 1.8.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: 79fe3ef476a7b23398e9a16f0af6a574713134a9a3052030987471b7496bbcac
4
- data.tar.gz: f9f631c3b099331008c01bf2f259fb349ca2a5e1d65f87838ffe8ee42ae91010
3
+ metadata.gz: 36035d27d375b8098512561105aa30d0290914b409899ee5e90cdb2a2145cde5
4
+ data.tar.gz: 81094e27f656842d6861b7fc7f6b6ea9a0cf6538e12a1599c972d659e9aa866d
5
5
  SHA512:
6
- metadata.gz: aa3dd6da896e503004e075652dc9215eb0b0a2441fb34c0c7f880b373aca553ec31f3104aceb7ed1a50897a263a1b87e2f6d5379dbf55cb7c49d872cd99b18c5
7
- data.tar.gz: 69fecba36d8e1b3e48e60f71c30a040a7210e13e9893d1256adadd242bd60784e1066d26904e5c7400431399b347cf0c02e0a07f621aef497851d9ec40a79dd4
6
+ metadata.gz: 46af6ca0b0c7e5ab327c5bde1fe3f7e1414ba6d294458aed3718657ad23585549b6ccd88eaa863a893ad40dbb1b216f29f28e5c5532a51250705f7952f3d90db
7
+ data.tar.gz: f3aa38aafeb69b366f79491c1e296f3e1ac994d2f341e9fd11e8b520c49f8612eee31d586868702fe7f8f2c2fae9e1dc5ebc8c53682c7f92f1094c26495ba82d
data/.github/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @sequra/core-tech
1
+ * @sequra/xp80
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.8.0](https://github.com/sequra/sequra-style/compare/v1.7.0...v1.8.0) (2026-01-20)
4
+
5
+
6
+ ### Features
7
+
8
+ * Enforce Ruby Style Guide compliance with surveyed team preferences ([#51](https://github.com/sequra/sequra-style/issues/51)) ([f0ffdf4](https://github.com/sequra/sequra-style/commit/f0ffdf4b0bcbdcd43ec399fb1d5f867f408bdb93))
9
+
3
10
  ## [1.7.0](https://github.com/sequra/sequra-style/compare/v1.6.0...v1.7.0) (2025-12-05)
4
11
 
5
12
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sequra-style (1.7.0)
4
+ sequra-style (1.8.0)
5
5
  rubocop (~> 1)
6
6
  rubocop-performance (~> 1)
7
7
  rubocop-rails (~> 2)
data/default.yml CHANGED
@@ -12,7 +12,7 @@ AllCops:
12
12
  - "**/vendor/**/*"
13
13
  - "**/node_modules/**/*"
14
14
  - "local_files/**/*"
15
- - db/schema.rb
15
+ - db/*.rb
16
16
 
17
17
  # Exclude migration files created before December 2025:
18
18
  # NOTE: Do not keep adding new exlcusions here. New migrations after this are expected to comply with the current style
@@ -31,20 +31,8 @@ AllCops:
31
31
  - db/*/2022*.rb
32
32
  - db/*/2023*.rb
33
33
  - db/*/2024*.rb
34
- - db/*/202501*.rb
35
- - db/*/202502*.rb
36
- - db/*/202503*.rb
37
- - db/*/202504*.rb
38
- - db/*/202505*.rb
39
- - db/*/202506*.rb
40
- - db/*/202507*.rb
41
- - db/*/202508*.rb
42
- - db/*/202509*.rb
43
- - db/*/202510*.rb
44
- - db/*/202511*.rb
45
- - db/*/20251201*.rb
46
- - db/*/20251202*.rb
47
- - db/*/20251203*.rb
34
+ - db/*/2025*.rb
35
+ - db/*/202601*.rb
48
36
 
49
37
  Performance:
50
38
  Enabled: true
@@ -75,34 +63,34 @@ Rails/SkipsModelValidations:
75
63
  Exclude:
76
64
  - "**/spec/**/*"
77
65
 
66
+ # Prefer Time over DateTime for timezone handling
78
67
  Rails/TimeZone:
79
68
  Enabled: true
80
69
 
81
- # Prefer &&/|| over and/or.
82
- Style/AndOr:
83
- Enabled: true
84
-
85
- Style/DateTime:
70
+ # Indent access modifiers like private/protected
71
+ # https://rubystyle.guide/#indent-public-private-protected
72
+ Layout/AccessModifierIndentation:
73
+ EnforcedStyle: indent
86
74
  Enabled: true
87
75
 
88
- Style/MultilineIfModifier:
76
+ # Align multi-line array elements
77
+ # https://rubystyle.guide/#align-multiline-arrays
78
+ Layout/ArrayAlignment:
89
79
  Enabled: true
90
80
 
91
- Style/NestedModifier:
92
- Enabled: true
93
-
94
- Style/SoleNestedConditional:
81
+ # Align block end with start of block
82
+ # NOT RELATED TO RUBY STYLE GUIDE
83
+ Layout/BlockAlignment:
84
+ EnforcedStyleAlignWith: start_of_block
95
85
  Enabled: true
96
86
 
97
- # https://docs.rubocop.org/rubocop/cops_layout.html#layoutaccessmodifierindentation
98
- Layout/AccessModifierIndentation:
99
- EnforcedStyle: outdent
100
- Severity: info
101
-
102
- # Align `when` with `case`.
87
+ # Align `when` with `case`
88
+ # https://rubystyle.guide/#indent-when-to-case
103
89
  Layout/CaseIndentation:
104
90
  Enabled: true
105
91
 
92
+ # Use consistent class structure
93
+ # https://rubystyle.guide/#consistent-classes
106
94
  Layout/ClassStructure:
107
95
  Enabled: true
108
96
  ExpectedOrder:
@@ -136,203 +124,316 @@ Layout/ClassStructure:
136
124
  - prepend
137
125
  - extend
138
126
 
139
- # Align comments with method definitions.
127
+ # Align comments with method definitions
140
128
  Layout/CommentIndentation:
141
129
  Enabled: true
142
130
 
131
+ # Align else with if
143
132
  Layout/ElseAlignment:
144
133
  Enabled: true
145
134
 
146
- # Align `end` with the matching keyword or starting expression except for
147
- # assignments, where it should be aligned with the LHS.
135
+ # Align `end` with the matching keyword
136
+ # https://rubystyle.guide/#indent-conditional-assignment
148
137
  Layout/EndAlignment:
138
+ EnforcedStyleAlignWith: keyword
149
139
  Enabled: true
150
- EnforcedStyleAlignWith: variable
151
140
  AutoCorrect: true
152
141
 
142
+ # Use Unix-style line endings
143
+ # https://rubystyle.guide/#crlf
144
+ Layout/EndOfLine:
145
+ Enabled: true
146
+
147
+ # Separate magic comments from code with blank line
148
+ # https://rubystyle.guide/#separate-magic-comments-from-code
153
149
  Layout/EmptyLineAfterMagicComment:
154
150
  Enabled: true
155
151
 
152
+ # Use empty lines between method definitions
153
+ # https://rubystyle.guide/#empty-lines-between-methods
154
+ Layout/EmptyLineBetweenDefs:
155
+ Enabled: true
156
+
157
+ # No empty lines around block bodies
158
+ # https://rubystyle.guide/#empty-lines-around-bodies
156
159
  Layout/EmptyLinesAroundBlockBody:
157
160
  Enabled: true
158
161
 
159
- # In a regular class definition, no empty lines around the body.
162
+ # No empty lines around class bodies
163
+ # https://rubystyle.guide/#empty-lines-around-bodies
160
164
  Layout/EmptyLinesAroundClassBody:
161
165
  Enabled: true
162
166
 
163
- # In a regular method definition, no empty lines around the body.
167
+ # No empty lines around method bodies
164
168
  Layout/EmptyLinesAroundMethodBody:
165
169
  Enabled: true
166
170
 
167
- # In a regular module definition, no empty lines around the body.
171
+ # No empty lines around module bodies
172
+ # https://rubystyle.guide/#empty-lines-around-bodies
168
173
  Layout/EmptyLinesAroundModuleBody:
169
174
  Enabled: true
170
175
 
171
- # Align block 'end's either with the start of the block or with the first
172
- # character of the line containing the start of the block
173
- Layout/BlockAlignment:
176
+ # Indent first method argument properly
177
+ # https://rubystyle.guide/#no-double-indent
178
+ Layout/FirstArgumentIndentation:
179
+ EnforcedStyle: consistent
180
+ Severity: warning
181
+
182
+ # Indent first array element properly
183
+ Layout/FirstArrayElementIndentation:
184
+ EnforcedStyle: consistent
174
185
  Enabled: true
175
- EnforcedStyleAlignWith: either
176
186
 
177
- # Enforce empty line between method definitions
178
- Layout/EmptyLineBetweenDefs:
187
+ # Method definitions after `private` or `protected` should be indented consistently
188
+ Layout/IndentationConsistency:
189
+ EnforcedStyle: normal
179
190
  Enabled: true
180
191
 
181
- Layout/FirstArgumentIndentation:
192
+ # Two spaces per indentation level
193
+ # https://rubystyle.guide/#spaces-indentation
194
+ Layout/IndentationWidth:
182
195
  Enabled: true
183
196
 
184
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
185
- Style/HashSyntax:
197
+ # Use spaces for indentation, not tabs
198
+ # https://rubystyle.guide/#tabs-or-spaces
199
+ Layout/IndentationStyle:
186
200
  Enabled: true
187
201
 
188
- # Method definitions after `private` or `protected` isolated calls need one
189
- # extra level of indentation.
190
- Layout/IndentationConsistency:
202
+ # Use space after # in comments
203
+ # https://rubystyle.guide/#hash-space
204
+ Layout/LeadingCommentSpace:
191
205
  Enabled: true
192
- EnforcedStyle: indented_internal_methods
193
206
 
194
- # Two spaces, no tabs (for indentation).
195
- Layout/IndentationWidth:
207
+ # Limit lines to reasonable length
208
+ # https://rubystyle.guide/#max-line-length
209
+ Layout/LineLength:
196
210
  Enabled: true
211
+ Max: 128
197
212
 
198
- Layout/LeadingCommentSpace:
213
+ # Align chained method calls
214
+ # https://rubystyle.guide/#consistent-multi-line-chains
215
+ Layout/MultilineMethodCallIndentation:
216
+ EnforcedStyle: aligned
199
217
  Enabled: true
200
218
 
219
+ # Use space after colon
201
220
  Layout/SpaceAfterColon:
202
221
  Enabled: true
203
222
 
223
+ # Use space after comma
204
224
  Layout/SpaceAfterComma:
205
225
  Enabled: true
206
226
 
227
+ # Use spaces around = in default parameters
228
+ # https://rubystyle.guide/#spaces-around-equals
207
229
  Layout/SpaceAroundEqualsInParameterDefault:
208
230
  Enabled: true
209
231
 
232
+ # Use spaces around keywords
210
233
  Layout/SpaceAroundKeyword:
211
234
  Enabled: true
212
235
 
236
+ # Use spaces around operators
237
+ # https://rubystyle.guide/#spaces-operators
213
238
  Layout/SpaceAroundOperators:
214
239
  Enabled: true
215
240
 
241
+ # Use `foo {}` not `foo{}`
242
+ # https://rubystyle.guide/#spaces-braces
243
+ Layout/SpaceBeforeBlockBraces:
244
+ Enabled: true
245
+
246
+ # No space before comma
216
247
  Layout/SpaceBeforeComma:
217
248
  Enabled: true
218
249
 
250
+ # Use space before inline comments
219
251
  Layout/SpaceBeforeComment:
220
252
  Enabled: true
221
253
 
254
+ # No space between method name and opening parenthesis
255
+ # https://rubystyle.guide/#parens-no-spaces
222
256
  Layout/SpaceBeforeFirstArg:
223
257
  Enabled: true
224
- Exclude:
225
- - "**/spec/**/*"
226
258
 
227
- Style/DefWithParentheses:
259
+ # Use `foo { bar }` not `foo {bar}`
260
+ # https://rubystyle.guide/#spaces-braces
261
+ Layout/SpaceInsideBlockBraces:
262
+ EnforcedStyle: space
228
263
  Enabled: true
229
264
 
230
- # Defining a method with parameters needs parentheses.
231
- Style/MethodDefParentheses:
265
+ # Use `{ a: 1 }` not `{a:1}`
266
+ # https://rubystyle.guide/#spaces-braces
267
+ Layout/SpaceInsideHashLiteralBraces:
268
+ EnforcedStyle: space
232
269
  Enabled: true
233
270
 
234
- Style/FrozenStringLiteralComment:
235
- Enabled: false
236
- EnforcedStyle: always
237
-
238
- Layout/LineLength:
271
+ # No space inside parentheses
272
+ # https://rubystyle.guide/#no-space-inside-range-literals
273
+ Layout/SpaceInsideParens:
274
+ EnforcedStyle: no_space
239
275
  Enabled: true
240
- Max: 128
241
276
 
242
- # Use `foo {}` not `foo{}`.
243
- Layout/SpaceBeforeBlockBraces:
277
+ # End files with a newline
278
+ # https://rubystyle.guide/#newline-eof
279
+ Layout/TrailingEmptyLines:
244
280
  Enabled: true
245
281
 
246
- # Use `foo { bar }` not `foo {bar}`.
247
- Layout/SpaceInsideBlockBraces:
282
+ # No trailing whitespace
283
+ # https://rubystyle.guide/#no-trailing-whitespace
284
+ Layout/TrailingWhitespace:
248
285
  Enabled: true
249
286
 
250
- # Use `{ a: 1 }` not `{a:1}`.
251
- Layout/SpaceInsideHashLiteralBraces:
287
+ # Avoid ambiguous block association with method call
288
+ Lint/AmbiguousBlockAssociation:
252
289
  Enabled: true
253
290
 
254
- Layout/SpaceInsideParens:
291
+ # Wrap safe assignment in parentheses when used in condition
292
+ # https://rubystyle.guide/#safe-assignment-in-condition
293
+ Lint/AssignmentInCondition:
255
294
  Enabled: true
256
295
 
257
- # Check quotes usage according to lint rule below.
258
- Style/StringLiterals:
296
+ # Don't define constants in blocks
297
+ # https://rubystyle.guide/#no-constant-definition-in-block
298
+ Lint/ConstantDefinitionInBlock:
259
299
  Enabled: true
260
- EnforcedStyle: double_quotes
261
300
 
262
- # Detect hard tabs, no hard tabs.
263
- Layout/IndentationStyle:
301
+ # Don't leave debugger statements in code
302
+ Lint/Debugger:
264
303
  Enabled: true
265
304
 
266
- # Blank lines should not have any spaces.
267
- Layout/TrailingEmptyLines:
305
+ # Avoid empty class definitions
306
+ Lint/EmptyClass:
268
307
  Enabled: true
269
308
 
270
- # No trailing whitespace.
271
- Layout/TrailingWhitespace:
309
+ # Don't return from ensure blocks
310
+ # https://rubystyle.guide/#no-return-ensure
311
+ Lint/EnsureReturn:
272
312
  Enabled: true
273
313
 
274
- Lint/Debugger:
314
+ # Don't define nested methods; use lambda instead
315
+ # https://rubystyle.guide/#no-nested-methods
316
+ Lint/NestedMethodDefinition:
275
317
  Enabled: true
276
318
 
277
- # Detect redundant disabling of cops and automatically remove them with --autocorrect
319
+ # Detect redundant disabling of cops
278
320
  Lint/RedundantCopDisableDirective:
279
321
  Enabled: true
280
322
 
281
- # Use quotes for string literals when they are enough.
282
- Style/RedundantPercentQ:
323
+ # Avoid redundant string coercion
324
+ Lint/RedundantStringCoercion:
283
325
  Enabled: true
284
326
 
285
- # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
327
+ # Use parentheses for method calls with arguments
286
328
  Lint/RequireParentheses:
287
329
  Enabled: true
288
330
 
289
- Lint/RedundantStringCoercion:
331
+ # Don't rescue Exception class
332
+ # https://rubystyle.guide/#no-blind-rescues
333
+ Lint/RescueException:
334
+ Enabled: true
335
+
336
+ # Avoid shadowing methods with local variables
337
+ # https://rubystyle.guide/#no-shadowing
338
+ Lint/ShadowingOuterLocalVariable:
290
339
  Enabled: true
291
340
 
341
+ # Don't suppress exceptions without handling
342
+ # https://rubystyle.guide/#dont-hide-exceptions
343
+ Lint/SuppressedException:
344
+ Enabled: true
345
+
346
+ # Prefix unused block arguments with underscore
347
+ # https://rubystyle.guide/#underscore-unused-vars
348
+ Lint/UnusedBlockArgument:
349
+ Enabled: true
350
+
351
+ # Prefix unused method arguments with underscore
352
+ # https://rubystyle.guide/#underscore-unused-vars
353
+ Lint/UnusedMethodArgument:
354
+ Enabled: true
355
+
356
+ # URI.escape is obsolete
292
357
  Lint/UriEscapeUnescape:
293
358
  Enabled: true
294
359
 
295
- Style/ParenthesesAroundCondition:
360
+ # Keep methods short (under 10 lines ideally)
361
+ # https://rubystyle.guide/#short-methods
362
+ Metrics/MethodLength:
296
363
  Enabled: true
297
364
 
298
- Style/RedundantReturn:
365
+ # Avoid long parameter lists (3-4 items max)
366
+ # https://rubystyle.guide/#too-many-params
367
+ Metrics/ParameterLists:
368
+ Max: 4
299
369
  Enabled: true
300
- AllowMultipleReturnValues: true
301
370
 
302
- Style/Semicolon:
371
+ # Avoid get_/set_ prefixes for accessor methods
372
+ # https://rubystyle.guide/#accessor_mutator_method_names
373
+ Naming/AccessorMethodName:
303
374
  Enabled: true
304
- AllowAsExpressionSeparator: true
305
375
 
306
- # Prefer Foo.method over Foo::method
307
- Style/ColonMethodCall:
376
+ # Use English for identifiers
377
+ # https://rubystyle.guide/#english-identifiers
378
+ Naming/AsciiIdentifiers:
308
379
  Enabled: true
309
380
 
310
- Style/TrivialAccessors:
381
+ # Use CapitalCase for classes and modules
382
+ # https://rubystyle.guide/#camelcase-classes
383
+ Naming/ClassAndModuleCamelCase:
311
384
  Enabled: true
312
385
 
313
- # Use guard clauses when possible
314
- Style/GuardClause:
386
+ # Use SCREAMING_SNAKE_CASE for constants
387
+ # https://rubystyle.guide/#screaming-snake-case
388
+ Naming/ConstantName:
315
389
  Enabled: true
316
390
 
317
- Performance/FlatMap:
391
+ # Use snake_case for filenames
392
+ # https://rubystyle.guide/#snake-case-files
393
+ Naming/FileName:
318
394
  Enabled: true
319
395
 
320
- Performance/RedundantMerge:
396
+ # Use snake_case for method names
397
+ # https://rubystyle.guide/#snake-case-symbols-methods-vars
398
+ Naming/MethodName:
321
399
  Enabled: true
322
400
 
323
- Performance/StartWith:
401
+ # Avoid is_, does_, can_ prefixes for predicate methods
402
+ # https://rubystyle.guide/#bool-methods-prefix
403
+ Naming/PredicatePrefix:
404
+ Enabled: true
405
+
406
+ # Use snake_case for variable names
407
+ # https://rubystyle.guide/#snake-case-symbols-methods-vars
408
+ Naming/VariableName:
324
409
  Enabled: true
325
410
 
326
411
  Performance/EndWith:
327
412
  Enabled: true
328
413
 
414
+ # Use flat_map over map + flatten
415
+ # https://rubystyle.guide/#flat-map
416
+ Performance/FlatMap:
417
+ Enabled: true
418
+
419
+ Performance/RedundantMerge:
420
+ Enabled: true
421
+
329
422
  Performance/RegexpMatch:
330
423
  Enabled: true
331
424
 
425
+ Performance/StartWith:
426
+ Enabled: true
427
+
428
+ RSpec/ContextMethod:
429
+ Severity: info
430
+
332
431
  RSpec/ContextWording:
333
432
  Enabled: false
334
433
 
335
- RSpec/ContextMethod:
434
+ # Enforce empty line between 'it' blocks (allows oneliners)
435
+ RSpec/EmptyLineAfterExample:
436
+ Enabled: true
336
437
  Severity: info
337
438
 
338
439
  RSpec/ExampleLength:
@@ -347,7 +448,351 @@ RSpec/MultipleExpectations:
347
448
  RSpec/NestedGroups:
348
449
  Enabled: false
349
450
 
350
- # Enforce empty line between 'it' blocks (allows oneliners)
351
- RSpec/EmptyLineAfterExample:
451
+ # Prefer alias over alias_method for lexical scope
452
+ # https://rubystyle.guide/#alias-method-lexically
453
+ Style/Alias:
454
+ EnforcedStyle: prefer_alias
455
+ Enabled: true
456
+
457
+ # Prefer &&/|| over and/or for boolean logic
458
+ # https://rubystyle.guide/#and-or-flow
459
+ Style/AndOr:
460
+ Enabled: true
461
+
462
+ # Use Ruby 2.7+ arguments forwarding (...)
463
+ # https://rubystyle.guide/#arguments-forwarding
464
+ Style/ArgumentsForwarding:
465
+ Enabled: true
466
+
467
+ # Use resource methods with automatic cleanup
468
+ # https://rubystyle.guide/#auto-release-resources
469
+ Style/AutoResourceCleanup:
470
+ Enabled: true
471
+
472
+ # Avoid BEGIN blocks
473
+ # https://rubystyle.guide/#no-BEGIN-blocks
474
+ Style/BeginBlock:
475
+ Enabled: true
476
+
477
+ # Use {} for single-line blocks, do...end for multi-line
478
+ # https://rubystyle.guide/#single-line-blocks
479
+ Style/BlockDelimiters:
480
+ EnforcedStyle: line_count_based
481
+ Enabled: true
482
+
483
+ # Avoid explicit === operator use
484
+ # https://rubystyle.guide/#no-case-equality
485
+ Style/CaseEquality:
486
+ Enabled: true
487
+
488
+ # Prefer case over if-elsif chains
489
+ Style/CaseLikeIf:
490
+ Enabled: true
491
+
492
+ # Use compact module/class nesting
493
+ # https://rubystyle.guide/#namespace-definition
494
+ Style/ClassAndModuleChildren:
495
+ Enabled: true
496
+
497
+ # Prefer is_a? over kind_of?
498
+ Style/ClassCheck:
499
+ Enabled: true
500
+
501
+ # Use def self.method for class methods
502
+ Style/ClassMethodsDefinitions:
503
+ Enabled: true
504
+
505
+ # Avoid class variables (@@)
506
+ # https://rubystyle.guide/#no-class-vars
507
+ Style/ClassVars:
508
+ Enabled: true
509
+
510
+ # Use preferred method names (e.g., map vs collect)
511
+ # https://rubystyle.guide/#map-find-select-reduce-include-size
512
+ Style/CollectionMethods:
513
+ Enabled: true
514
+
515
+ # Use :: only for constants, not regular methods
516
+ # https://rubystyle.guide/#double-colons
517
+ Style/ColonMethodCall:
518
+ Enabled: true
519
+
520
+ # Format comment annotations properly
521
+ # https://rubystyle.guide/#annotate-keywords
522
+ Style/CommentAnnotation:
523
+ Enabled: true
524
+
525
+ # Simplify conditional variable assignment
526
+ Style/ConditionalAssignment:
527
+ Enabled: true
528
+
529
+ # Don't use DateTime unless necessary
530
+ # https://rubystyle.guide/#no-datetime
531
+ Style/DateTime:
532
+ Enabled: true
533
+
534
+ # Use def with parentheses when there are parameters
535
+ # https://rubystyle.guide/#method-parens
536
+ Style/DefWithParentheses:
537
+ Enabled: true
538
+
539
+ # Avoid unnecessary !!
540
+ # https://rubystyle.guide/#no-bang-bang
541
+ Style/DoubleNegation:
542
+ Enabled: true
543
+
544
+ # Avoid for loops; use iterators
545
+ # https://rubystyle.guide/#no-for-loops
546
+ Style/For:
547
+ EnforcedStyle: each
548
+ Enabled: true
549
+
550
+ # Magic comment for frozen string literals
551
+ Style/FrozenStringLiteralComment:
552
+ Enabled: false
553
+ EnforcedStyle: always
554
+
555
+ # Use guard clauses instead of nested conditionals
556
+ # https://rubystyle.guide/#no-nested-conditionals
557
+ Style/GuardClause:
558
+ Enabled: true
559
+
560
+ Style/HashConversion:
561
+ Enabled: true
562
+
563
+ # Use Hash#each_key / #each_value
564
+ # https://rubystyle.guide/#hash-each
565
+ Style/HashEachMethods:
566
+ Enabled: true
567
+
568
+ # Use Ruby 1.9+ hash syntax for symbol keys
569
+ # https://rubystyle.guide/#hash-literals
570
+ Style/HashSyntax:
571
+ EnforcedStyle: no_mixed_keys
572
+ EnforcedShorthandSyntax: always
573
+ Enabled: true
574
+
575
+ # Use transform_keys for hash key transformation
576
+ # https://rubystyle.guide/#hash-transform-methods
577
+ Style/HashTransformKeys:
578
+ Enabled: true
579
+
580
+ # Use transform_values for hash value transformation
581
+ # https://rubystyle.guide/#hash-transform-methods
582
+ Style/HashTransformValues:
583
+ Enabled: true
584
+
585
+ # Use Kernel#loop for infinite loops
586
+ # https://rubystyle.guide/#infinite-loop
587
+ Style/InfiniteLoop:
588
+ Enabled: true
589
+
590
+ # Use lambda for multi-line blocks, -> for single-line
591
+ # https://rubystyle.guide/#lambda-multi-line
592
+ Style/Lambda:
593
+ EnforcedStyle: line_count_dependent
594
+ Enabled: true
595
+
596
+ # Prefer .call() for proc invocation
597
+ # https://rubystyle.guide/#proc-call
598
+ Style/LambdaCall:
599
+ EnforcedStyle: call
600
+ Enabled: true
601
+
602
+ # Use << for string construction instead of concatenation
603
+ Style/LineEndConcatenation:
604
+ Enabled: true
605
+
606
+ # Format magic comments consistently
607
+ Style/MagicCommentFormat:
608
+ Enabled: true
609
+
610
+ # Use parentheses for method definitions with parameters
611
+ # https://rubystyle.guide/#method-parens
612
+ Style/MethodDefParentheses:
613
+ Enabled: true
614
+
615
+ # Use parentheses for method calls with arguments
616
+ # https://rubystyle.guide/#method-call-parentheses
617
+ Style/MethodCallWithArgsParentheses:
618
+ Enabled: true
619
+ AllowedMethods:
620
+ - allow
621
+ - allow_any_instance_of
622
+ - authorize
623
+ - be
624
+ - be_a
625
+ - change
626
+ - confirmed_order
627
+ - contain_exactly
628
+ - describe
629
+ - eq
630
+ - expect
631
+ - expect_any_instance_of
632
+ - fail
633
+ - have_button
634
+ - have_content
635
+ - have_field
636
+ - have_link
637
+ - have_selector
638
+ - have_text
639
+ - head
640
+ - include
641
+ - include?
642
+ - info
643
+ - log
644
+ - match
645
+ - match_array
646
+ - move_down
647
+ - not_to
648
+ - on
649
+ - p
650
+ - print
651
+ - puts
652
+ - raise
653
+ - raise_error
654
+ - redirect_to
655
+ - render
656
+ - send_data
657
+ - snapshot!
658
+ - step_to
659
+ - to
660
+ - travel
661
+ - use
662
+
663
+ # Omit parentheses for method calls without arguments
664
+ Style/MethodCallWithoutArgsParentheses:
665
+ Enabled: true
666
+
667
+ # Split multiple mixins into separate statements
668
+ # https://rubystyle.guide/#mixin-grouping
669
+ Style/MixinGrouping:
670
+ Enabled: true
671
+
672
+ # Prefer module_function over extend self
673
+ # https://rubystyle.guide/#module-function
674
+ Style/ModuleFunction:
675
+ Enabled: true
676
+
677
+ # Use modifier if/unless for single-line bodies
678
+ Style/MultilineIfModifier:
679
+ Enabled: true
680
+
681
+ # Avoid mutable hash default values
682
+ # https://rubystyle.guide/#no-mutable-defaults
683
+ Style/MutableConstant:
684
+ Enabled: true
685
+
686
+ # Prefer unless for negative conditions
687
+ # https://rubystyle.guide/#unless-for-negatives
688
+ Style/NegatedIf:
689
+ Enabled: true
690
+
691
+ # Avoid nested modifier conditions
692
+ # https://rubystyle.guide/#no-nested-modifiers
693
+ Style/NestedModifier:
694
+ Enabled: true
695
+
696
+ # Define optional arguments at end of parameter list
697
+ # https://rubystyle.guide/#optional-arguments
698
+ Style/OptionalArguments:
699
+ Enabled: true
700
+
701
+ # Don't parenthesize control expression conditions
702
+ # https://rubystyle.guide/#no-parens-around-condition
703
+ Style/ParenthesesAroundCondition:
704
+ Enabled: true
705
+
706
+ # Use Hash#key? over has_key?
707
+ # https://rubystyle.guide/#hash-key
708
+ Style/PreferredHashMethods:
709
+ Enabled: true
710
+
711
+ # Supply exception class and message separately
712
+ # https://rubystyle.guide/#exception-class-messages
713
+ Style/RaiseArgs:
714
+ Enabled: true
715
+
716
+ # Avoid explicit return where not required
717
+ # https://rubystyle.guide/#no-explicit-return
718
+ Style/RedundantReturn:
719
+ Enabled: true
720
+
721
+ # Use quotes for string literals when sufficient
722
+ # NOT RELATED TO RUBY STYLE GUIDE
723
+ Style/RedundantPercentQ:
724
+ Enabled: true
725
+
726
+ # Don't use semicolons except as expression separators
727
+ # https://rubystyle.guide/#no-semicolon
728
+ Style/Semicolon:
729
+ Enabled: true
730
+ AllowAsExpressionSeparator: true
731
+
732
+ # Prefer raise over fail
733
+ Style/SignalException:
734
+ Enabled: true
735
+
736
+ # Avoid single-line methods
737
+ # https://rubystyle.guide/#no-single-line-methods
738
+ Style/SingleLineMethods:
739
+ Enabled: true
740
+
741
+ # Simplify nested conditionals
742
+ # NOT RELATED TO RUBY STYLE GUIDE
743
+ Style/SoleNestedConditional:
744
+ Enabled: true
745
+
746
+ # Adopt consistent string quoting style
747
+ # https://rubystyle.guide/#consistent-string-literals
748
+ Style/StringLiterals:
749
+ Enabled: true
750
+ EnforcedStyle: double_quotes
751
+
752
+ # Use << for string construction
753
+ Style/StringConcatenation:
754
+ Enabled: true
755
+
756
+ # Don't extend Struct.new instances
757
+ # https://rubystyle.guide/#no-extend-struct-new
758
+ Style/StructInheritance:
759
+ Enabled: true
760
+
761
+ # Use %i for symbol arrays
762
+ # https://rubystyle.guide/#percent-i
763
+ Style/SymbolArray:
764
+ EnforcedStyle: brackets
765
+ Enabled: true
766
+
767
+ # Use Proc shorthand for single-action blocks
768
+ # https://rubystyle.guide/#single-action-blocks
769
+ Style/SymbolProc:
770
+ Enabled: true
771
+
772
+ # Avoid trailing commas in array literals
773
+ # https://rubystyle.guide/#no-trailing-array-commas
774
+ Style/TrailingCommaInArrayLiteral:
775
+ EnforcedStyleForMultiline: no_comma
776
+ Enabled: true
777
+
778
+ # Avoid trailing commas in block arguments
779
+ # https://rubystyle.guide/#no-trailing-parameters-comma
780
+ Style/TrailingCommaInBlockArgs:
781
+ Enabled: true
782
+
783
+ # Handle trailing commas in hash literals consistently
784
+ # https://rubystyle.guide/#no-trailing-array-commas
785
+ Style/TrailingCommaInHashLiteral:
786
+ EnforcedStyleForMultiline: consistent_comma
787
+ Enabled: true
788
+
789
+ # Use attr_family for trivial accessors
790
+ # https://rubystyle.guide/#attr_family
791
+ Style/TrivialAccessors:
792
+ Enabled: true
793
+
794
+ # Use %w for word arrays
795
+ # https://rubystyle.guide/#percent-w
796
+ Style/WordArray:
797
+ EnforcedStyle: brackets
352
798
  Enabled: true
353
- Severity: info
@@ -1,5 +1,5 @@
1
1
  module Sequra
2
2
  module Style
3
- VERSION = "1.7.0"
3
+ VERSION = "1.8.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequra-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sequra engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-12-05 00:00:00.000000000 Z
11
+ date: 2026-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop