sequra-style 1.6.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: 72bcd70c9706050c262b4d8fb94f7f02569f694f37370acd709cf6de6a236424
4
- data.tar.gz: fd300c502ae4701d531f028397b1e60632abfdb1d013576dbb438b5602e87d33
3
+ metadata.gz: 36035d27d375b8098512561105aa30d0290914b409899ee5e90cdb2a2145cde5
4
+ data.tar.gz: 81094e27f656842d6861b7fc7f6b6ea9a0cf6538e12a1599c972d659e9aa866d
5
5
  SHA512:
6
- metadata.gz: b0c96cb8be13c500c2616bada1dc60e5d056f1fe46acf774c3747c46edab96a048be90b7496ec6c9e043091d4116a30e45a5859228d112a2a6b9d43e84cdf451
7
- data.tar.gz: 76afd51994025cb47f90a64ae9e40b3d27ab1c3a98841ae1744bd759caa58c3a2a79fc14d2d112e142e0e48990b9e724fd1485ec744d81734fb195ecae38d001
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,19 @@
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
+
10
+ ## [1.7.0](https://github.com/sequra/sequra-style/compare/v1.6.0...v1.7.0) (2025-12-05)
11
+
12
+
13
+ ### Features
14
+
15
+ * Exclue db/schema.rb in all cops ([#48](https://github.com/sequra/sequra-style/issues/48)) ([fd170fd](https://github.com/sequra/sequra-style/commit/fd170fd504112d063b1431a17f43cab62af3fcb4))
16
+
3
17
  ## [1.6.0](https://github.com/sequra/sequra-style/compare/v1.5.0...v1.6.0) (2025-12-04)
4
18
 
5
19
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sequra-style (1.6.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,6 +12,7 @@ AllCops:
12
12
  - "**/vendor/**/*"
13
13
  - "**/node_modules/**/*"
14
14
  - "local_files/**/*"
15
+ - db/*.rb
15
16
 
16
17
  # Exclude migration files created before December 2025:
17
18
  # NOTE: Do not keep adding new exlcusions here. New migrations after this are expected to comply with the current style
@@ -30,20 +31,8 @@ AllCops:
30
31
  - db/*/2022*.rb
31
32
  - db/*/2023*.rb
32
33
  - db/*/2024*.rb
33
- - db/*/202501*.rb
34
- - db/*/202502*.rb
35
- - db/*/202503*.rb
36
- - db/*/202504*.rb
37
- - db/*/202505*.rb
38
- - db/*/202506*.rb
39
- - db/*/202507*.rb
40
- - db/*/202508*.rb
41
- - db/*/202509*.rb
42
- - db/*/202510*.rb
43
- - db/*/202511*.rb
44
- - db/*/20251201*.rb
45
- - db/*/20251202*.rb
46
- - db/*/20251203*.rb
34
+ - db/*/2025*.rb
35
+ - db/*/202601*.rb
47
36
 
48
37
  Performance:
49
38
  Enabled: true
@@ -74,34 +63,34 @@ Rails/SkipsModelValidations:
74
63
  Exclude:
75
64
  - "**/spec/**/*"
76
65
 
66
+ # Prefer Time over DateTime for timezone handling
77
67
  Rails/TimeZone:
78
68
  Enabled: true
79
69
 
80
- # Prefer &&/|| over and/or.
81
- Style/AndOr:
82
- Enabled: true
83
-
84
- Style/DateTime:
70
+ # Indent access modifiers like private/protected
71
+ # https://rubystyle.guide/#indent-public-private-protected
72
+ Layout/AccessModifierIndentation:
73
+ EnforcedStyle: indent
85
74
  Enabled: true
86
75
 
87
- Style/MultilineIfModifier:
76
+ # Align multi-line array elements
77
+ # https://rubystyle.guide/#align-multiline-arrays
78
+ Layout/ArrayAlignment:
88
79
  Enabled: true
89
80
 
90
- Style/NestedModifier:
91
- Enabled: true
92
-
93
- 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
94
85
  Enabled: true
95
86
 
96
- # https://docs.rubocop.org/rubocop/cops_layout.html#layoutaccessmodifierindentation
97
- Layout/AccessModifierIndentation:
98
- EnforcedStyle: outdent
99
- Severity: info
100
-
101
- # Align `when` with `case`.
87
+ # Align `when` with `case`
88
+ # https://rubystyle.guide/#indent-when-to-case
102
89
  Layout/CaseIndentation:
103
90
  Enabled: true
104
91
 
92
+ # Use consistent class structure
93
+ # https://rubystyle.guide/#consistent-classes
105
94
  Layout/ClassStructure:
106
95
  Enabled: true
107
96
  ExpectedOrder:
@@ -135,203 +124,316 @@ Layout/ClassStructure:
135
124
  - prepend
136
125
  - extend
137
126
 
138
- # Align comments with method definitions.
127
+ # Align comments with method definitions
139
128
  Layout/CommentIndentation:
140
129
  Enabled: true
141
130
 
131
+ # Align else with if
142
132
  Layout/ElseAlignment:
143
133
  Enabled: true
144
134
 
145
- # Align `end` with the matching keyword or starting expression except for
146
- # assignments, where it should be aligned with the LHS.
135
+ # Align `end` with the matching keyword
136
+ # https://rubystyle.guide/#indent-conditional-assignment
147
137
  Layout/EndAlignment:
138
+ EnforcedStyleAlignWith: keyword
148
139
  Enabled: true
149
- EnforcedStyleAlignWith: variable
150
140
  AutoCorrect: true
151
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
152
149
  Layout/EmptyLineAfterMagicComment:
153
150
  Enabled: true
154
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
155
159
  Layout/EmptyLinesAroundBlockBody:
156
160
  Enabled: true
157
161
 
158
- # 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
159
164
  Layout/EmptyLinesAroundClassBody:
160
165
  Enabled: true
161
166
 
162
- # In a regular method definition, no empty lines around the body.
167
+ # No empty lines around method bodies
163
168
  Layout/EmptyLinesAroundMethodBody:
164
169
  Enabled: true
165
170
 
166
- # 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
167
173
  Layout/EmptyLinesAroundModuleBody:
168
174
  Enabled: true
169
175
 
170
- # Align block 'end's either with the start of the block or with the first
171
- # character of the line containing the start of the block
172
- 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
173
185
  Enabled: true
174
- EnforcedStyleAlignWith: either
175
186
 
176
- # Enforce empty line between method definitions
177
- Layout/EmptyLineBetweenDefs:
187
+ # Method definitions after `private` or `protected` should be indented consistently
188
+ Layout/IndentationConsistency:
189
+ EnforcedStyle: normal
178
190
  Enabled: true
179
191
 
180
- Layout/FirstArgumentIndentation:
192
+ # Two spaces per indentation level
193
+ # https://rubystyle.guide/#spaces-indentation
194
+ Layout/IndentationWidth:
181
195
  Enabled: true
182
196
 
183
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
184
- Style/HashSyntax:
197
+ # Use spaces for indentation, not tabs
198
+ # https://rubystyle.guide/#tabs-or-spaces
199
+ Layout/IndentationStyle:
185
200
  Enabled: true
186
201
 
187
- # Method definitions after `private` or `protected` isolated calls need one
188
- # extra level of indentation.
189
- Layout/IndentationConsistency:
202
+ # Use space after # in comments
203
+ # https://rubystyle.guide/#hash-space
204
+ Layout/LeadingCommentSpace:
190
205
  Enabled: true
191
- EnforcedStyle: indented_internal_methods
192
206
 
193
- # Two spaces, no tabs (for indentation).
194
- Layout/IndentationWidth:
207
+ # Limit lines to reasonable length
208
+ # https://rubystyle.guide/#max-line-length
209
+ Layout/LineLength:
195
210
  Enabled: true
211
+ Max: 128
196
212
 
197
- Layout/LeadingCommentSpace:
213
+ # Align chained method calls
214
+ # https://rubystyle.guide/#consistent-multi-line-chains
215
+ Layout/MultilineMethodCallIndentation:
216
+ EnforcedStyle: aligned
198
217
  Enabled: true
199
218
 
219
+ # Use space after colon
200
220
  Layout/SpaceAfterColon:
201
221
  Enabled: true
202
222
 
223
+ # Use space after comma
203
224
  Layout/SpaceAfterComma:
204
225
  Enabled: true
205
226
 
227
+ # Use spaces around = in default parameters
228
+ # https://rubystyle.guide/#spaces-around-equals
206
229
  Layout/SpaceAroundEqualsInParameterDefault:
207
230
  Enabled: true
208
231
 
232
+ # Use spaces around keywords
209
233
  Layout/SpaceAroundKeyword:
210
234
  Enabled: true
211
235
 
236
+ # Use spaces around operators
237
+ # https://rubystyle.guide/#spaces-operators
212
238
  Layout/SpaceAroundOperators:
213
239
  Enabled: true
214
240
 
241
+ # Use `foo {}` not `foo{}`
242
+ # https://rubystyle.guide/#spaces-braces
243
+ Layout/SpaceBeforeBlockBraces:
244
+ Enabled: true
245
+
246
+ # No space before comma
215
247
  Layout/SpaceBeforeComma:
216
248
  Enabled: true
217
249
 
250
+ # Use space before inline comments
218
251
  Layout/SpaceBeforeComment:
219
252
  Enabled: true
220
253
 
254
+ # No space between method name and opening parenthesis
255
+ # https://rubystyle.guide/#parens-no-spaces
221
256
  Layout/SpaceBeforeFirstArg:
222
257
  Enabled: true
223
- Exclude:
224
- - "**/spec/**/*"
225
258
 
226
- Style/DefWithParentheses:
259
+ # Use `foo { bar }` not `foo {bar}`
260
+ # https://rubystyle.guide/#spaces-braces
261
+ Layout/SpaceInsideBlockBraces:
262
+ EnforcedStyle: space
227
263
  Enabled: true
228
264
 
229
- # Defining a method with parameters needs parentheses.
230
- Style/MethodDefParentheses:
265
+ # Use `{ a: 1 }` not `{a:1}`
266
+ # https://rubystyle.guide/#spaces-braces
267
+ Layout/SpaceInsideHashLiteralBraces:
268
+ EnforcedStyle: space
231
269
  Enabled: true
232
270
 
233
- Style/FrozenStringLiteralComment:
234
- Enabled: false
235
- EnforcedStyle: always
236
-
237
- Layout/LineLength:
271
+ # No space inside parentheses
272
+ # https://rubystyle.guide/#no-space-inside-range-literals
273
+ Layout/SpaceInsideParens:
274
+ EnforcedStyle: no_space
238
275
  Enabled: true
239
- Max: 128
240
276
 
241
- # Use `foo {}` not `foo{}`.
242
- Layout/SpaceBeforeBlockBraces:
277
+ # End files with a newline
278
+ # https://rubystyle.guide/#newline-eof
279
+ Layout/TrailingEmptyLines:
243
280
  Enabled: true
244
281
 
245
- # Use `foo { bar }` not `foo {bar}`.
246
- Layout/SpaceInsideBlockBraces:
282
+ # No trailing whitespace
283
+ # https://rubystyle.guide/#no-trailing-whitespace
284
+ Layout/TrailingWhitespace:
247
285
  Enabled: true
248
286
 
249
- # Use `{ a: 1 }` not `{a:1}`.
250
- Layout/SpaceInsideHashLiteralBraces:
287
+ # Avoid ambiguous block association with method call
288
+ Lint/AmbiguousBlockAssociation:
251
289
  Enabled: true
252
290
 
253
- Layout/SpaceInsideParens:
291
+ # Wrap safe assignment in parentheses when used in condition
292
+ # https://rubystyle.guide/#safe-assignment-in-condition
293
+ Lint/AssignmentInCondition:
254
294
  Enabled: true
255
295
 
256
- # Check quotes usage according to lint rule below.
257
- Style/StringLiterals:
296
+ # Don't define constants in blocks
297
+ # https://rubystyle.guide/#no-constant-definition-in-block
298
+ Lint/ConstantDefinitionInBlock:
258
299
  Enabled: true
259
- EnforcedStyle: double_quotes
260
300
 
261
- # Detect hard tabs, no hard tabs.
262
- Layout/IndentationStyle:
301
+ # Don't leave debugger statements in code
302
+ Lint/Debugger:
263
303
  Enabled: true
264
304
 
265
- # Blank lines should not have any spaces.
266
- Layout/TrailingEmptyLines:
305
+ # Avoid empty class definitions
306
+ Lint/EmptyClass:
267
307
  Enabled: true
268
308
 
269
- # No trailing whitespace.
270
- Layout/TrailingWhitespace:
309
+ # Don't return from ensure blocks
310
+ # https://rubystyle.guide/#no-return-ensure
311
+ Lint/EnsureReturn:
271
312
  Enabled: true
272
313
 
273
- Lint/Debugger:
314
+ # Don't define nested methods; use lambda instead
315
+ # https://rubystyle.guide/#no-nested-methods
316
+ Lint/NestedMethodDefinition:
274
317
  Enabled: true
275
318
 
276
- # Detect redundant disabling of cops and automatically remove them with --autocorrect
319
+ # Detect redundant disabling of cops
277
320
  Lint/RedundantCopDisableDirective:
278
321
  Enabled: true
279
322
 
280
- # Use quotes for string literals when they are enough.
281
- Style/RedundantPercentQ:
323
+ # Avoid redundant string coercion
324
+ Lint/RedundantStringCoercion:
282
325
  Enabled: true
283
326
 
284
- # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
327
+ # Use parentheses for method calls with arguments
285
328
  Lint/RequireParentheses:
286
329
  Enabled: true
287
330
 
288
- 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:
289
339
  Enabled: true
290
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
291
357
  Lint/UriEscapeUnescape:
292
358
  Enabled: true
293
359
 
294
- Style/ParenthesesAroundCondition:
360
+ # Keep methods short (under 10 lines ideally)
361
+ # https://rubystyle.guide/#short-methods
362
+ Metrics/MethodLength:
295
363
  Enabled: true
296
364
 
297
- Style/RedundantReturn:
365
+ # Avoid long parameter lists (3-4 items max)
366
+ # https://rubystyle.guide/#too-many-params
367
+ Metrics/ParameterLists:
368
+ Max: 4
298
369
  Enabled: true
299
- AllowMultipleReturnValues: true
300
370
 
301
- Style/Semicolon:
371
+ # Avoid get_/set_ prefixes for accessor methods
372
+ # https://rubystyle.guide/#accessor_mutator_method_names
373
+ Naming/AccessorMethodName:
302
374
  Enabled: true
303
- AllowAsExpressionSeparator: true
304
375
 
305
- # Prefer Foo.method over Foo::method
306
- Style/ColonMethodCall:
376
+ # Use English for identifiers
377
+ # https://rubystyle.guide/#english-identifiers
378
+ Naming/AsciiIdentifiers:
307
379
  Enabled: true
308
380
 
309
- Style/TrivialAccessors:
381
+ # Use CapitalCase for classes and modules
382
+ # https://rubystyle.guide/#camelcase-classes
383
+ Naming/ClassAndModuleCamelCase:
310
384
  Enabled: true
311
385
 
312
- # Use guard clauses when possible
313
- Style/GuardClause:
386
+ # Use SCREAMING_SNAKE_CASE for constants
387
+ # https://rubystyle.guide/#screaming-snake-case
388
+ Naming/ConstantName:
314
389
  Enabled: true
315
390
 
316
- Performance/FlatMap:
391
+ # Use snake_case for filenames
392
+ # https://rubystyle.guide/#snake-case-files
393
+ Naming/FileName:
317
394
  Enabled: true
318
395
 
319
- Performance/RedundantMerge:
396
+ # Use snake_case for method names
397
+ # https://rubystyle.guide/#snake-case-symbols-methods-vars
398
+ Naming/MethodName:
320
399
  Enabled: true
321
400
 
322
- 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:
323
409
  Enabled: true
324
410
 
325
411
  Performance/EndWith:
326
412
  Enabled: true
327
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
+
328
422
  Performance/RegexpMatch:
329
423
  Enabled: true
330
424
 
425
+ Performance/StartWith:
426
+ Enabled: true
427
+
428
+ RSpec/ContextMethod:
429
+ Severity: info
430
+
331
431
  RSpec/ContextWording:
332
432
  Enabled: false
333
433
 
334
- RSpec/ContextMethod:
434
+ # Enforce empty line between 'it' blocks (allows oneliners)
435
+ RSpec/EmptyLineAfterExample:
436
+ Enabled: true
335
437
  Severity: info
336
438
 
337
439
  RSpec/ExampleLength:
@@ -346,7 +448,351 @@ RSpec/MultipleExpectations:
346
448
  RSpec/NestedGroups:
347
449
  Enabled: false
348
450
 
349
- # Enforce empty line between 'it' blocks (allows oneliners)
350
- 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
351
798
  Enabled: true
352
- Severity: info
@@ -1,5 +1,5 @@
1
1
  module Sequra
2
2
  module Style
3
- VERSION = "1.6.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.6.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-04 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