uri_format_validator 0.1.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: a269dc84c2c447598296a57054d5dafc8ccb7123
4
- data.tar.gz: 27d776484df0dc001368ddae480e856854810a07
3
+ metadata.gz: 662386d8a9b9a39e5c43c3f01bad4de3d39a2996
4
+ data.tar.gz: f4db9c7be8335ca526eb57411a4c5e10161f8a59
5
5
  SHA512:
6
- metadata.gz: b1c2f0cbba014c8f408d4f97516c3e4cee11a128fed2338945f82728e53bf197e6328ed09627c7190283f6bceb91558f972570bf0222e5db5789c6c723898bfc
7
- data.tar.gz: 378dac152d123d480ebd4c61322a3fb0f7de147d61433541352a38940d4d60d2a685be45bcb6238897c15eb4f646ff89a56a935148f2f29f69853402ac198bb4
6
+ metadata.gz: 99ca683995cbe4d3130607a545f773fff0783819664874b494f8fd5247ebb2d0f92ff972b516aa3be0f4b25568e49a570e6ccac9be7e7b6043d98b5f31a3da5f
7
+ data.tar.gz: c273205b76ba5eb0d64b0f4677b33527e24a1597e97f918ce14412f0965d4fb9d12f56a60637fee315b3f57a1dceee272194e297667f406eff1a8f896b94c66e
@@ -12,7 +12,7 @@ engines:
12
12
  enabled: true
13
13
  rubocop:
14
14
  enabled: true
15
- channel: rubocop-0-49
15
+ channel: rubocop-0-50
16
16
  ratings:
17
17
  paths:
18
18
  - "**.inc"
@@ -8,7 +8,7 @@ root = true
8
8
  charset = utf-8
9
9
  end_of_line = lf
10
10
 
11
- [*.{rb,yml}]
11
+ [*.{rb,yml,feature}]
12
12
  indent_style = space
13
13
  indent_size = 2
14
14
  insert_final_newline = true
@@ -2,407 +2,300 @@ AllCops:
2
2
  Include:
3
3
  - "**/*.rake"
4
4
  - "**/Gemfile"
5
+ - "**/*.gemfile"
5
6
  - "**/Rakefile"
6
7
  Exclude:
7
8
  - "vendor/**/*"
8
9
  - "db/**/*"
10
+ - "tmp/**/*"
9
11
  DisplayCopNames: false
10
12
  StyleGuideCopsOnly: false
11
13
  Rails:
12
14
  Enabled: true
13
- Style/AndOr:
14
- Description: Use &&/|| instead of and/or.
15
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
15
+ Layout/AccessModifierIndentation:
16
+ Description: Check indentation of private/protected visibility modifiers.
17
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
16
18
  Enabled: true
17
- EnforcedStyle: always
19
+ EnforcedStyle: indent
18
20
  SupportedStyles:
19
- - always
20
- - conditionals
21
- Style/BarePercentLiterals:
22
- Description: Checks if usage of %() or %Q() matches configuration.
23
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
21
+ - outdent
22
+ - indent
23
+ Layout/AlignArray:
24
+ Description: Align the elements of an array literal if they span more than one line.
25
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
24
26
  Enabled: true
25
- EnforcedStyle: bare_percent
26
- SupportedStyles:
27
- - percent_q
28
- - bare_percent
29
- Style/BracesAroundHashParameters:
30
- Description: Enforce braces style around hash parameters.
27
+ Layout/AlignHash:
28
+ Description: Align the elements of a hash literal if they span more than one line.
31
29
  Enabled: true
32
- EnforcedStyle: no_braces
33
- SupportedStyles:
34
- - braces
35
- - no_braces
36
- - context_dependent
37
- Style/ClassAndModuleChildren:
38
- Description: Checks style of children classes and modules.
39
- Enabled: false
40
- EnforcedStyle: nested
30
+ EnforcedHashRocketStyle: key
31
+ EnforcedColonStyle: key
32
+ EnforcedLastArgumentHashStyle: always_inspect
33
+ SupportedLastArgumentHashStyles:
34
+ - always_inspect
35
+ - always_ignore
36
+ - ignore_implicit
37
+ - ignore_explicit
38
+ Layout/AlignParameters:
39
+ Description: Align the parameters of a method call if they span more than one line.
40
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
41
+ Enabled: true
42
+ EnforcedStyle: with_first_parameter
41
43
  SupportedStyles:
42
- - nested
43
- - compact
44
- Style/ClassCheck:
45
- Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
44
+ - with_first_parameter
45
+ - with_fixed_indentation
46
+ Layout/BlockEndNewline:
47
+ Description: Put end statement of multiline block on its own line.
46
48
  Enabled: true
47
- EnforcedStyle: is_a?
49
+ Layout/CaseIndentation:
50
+ Description: Indentation of when in a case/when/[else/]end.
51
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
52
+ Enabled: true
53
+ EnforcedStyle: case
48
54
  SupportedStyles:
49
- - is_a?
50
- - kind_of?
51
- Style/CollectionMethods:
52
- Description: Preferred collection methods.
53
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
55
+ - case
56
+ - end
57
+ IndentOneStep: false
58
+ Layout/CommentIndentation:
59
+ Description: Indentation of comments.
54
60
  Enabled: true
55
- PreferredMethods:
56
- collect: map
57
- collect!: map!
58
- inject: reduce
59
- detect: find
60
- find_all: select
61
- find: detect
62
- Style/CommentAnnotation:
63
- Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
64
- REVIEW).
65
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
66
- Enabled: false
67
- Keywords:
68
- - TODO
69
- - FIXME
70
- - OPTIMIZE
71
- - HACK
72
- - REVIEW
73
- Style/Encoding:
74
- Description: Use UTF-8 as the source file encoding.
75
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
76
- Enabled: false
77
- EnforcedStyle: always
61
+ Layout/DotPosition:
62
+ Description: Checks the position of the dot in multi-line method calls.
63
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
64
+ Enabled: true
65
+ EnforcedStyle: trailing
78
66
  SupportedStyles:
79
- - when_needed
80
- - always
81
- Style/FileName:
82
- Description: Use snake_case for source file names.
83
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
84
- Enabled: false
85
- Exclude: []
86
- Style/FrozenStringLiteralComment:
87
- Description: >-
88
- Add the frozen_string_literal comment to the top of files
89
- to help transition from Ruby 2.3.0 to Ruby 3.0.
90
- Enabled: false
91
- Style/For:
92
- Description: Checks use of for or each in multiline loops.
93
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
67
+ - leading
68
+ - trailing
69
+ Layout/ElseAlignment:
70
+ Description: Align elses and elsifs correctly.
94
71
  Enabled: true
95
- EnforcedStyle: each
72
+ Layout/EmptyLineBetweenDefs:
73
+ Description: Use empty lines between defs.
74
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
75
+ Enabled: true
76
+ AllowAdjacentOneLineDefs: false
77
+ Layout/EmptyLines:
78
+ Description: Don't use several empty lines in a row.
79
+ Enabled: true
80
+ Layout/EmptyLinesAroundAccessModifier:
81
+ Description: Keep blank lines around access modifiers.
82
+ Enabled: true
83
+ Layout/EmptyLinesAroundBlockBody:
84
+ Description: Keeps track of empty lines around block bodies.
85
+ Enabled: true
86
+ EnforcedStyle: no_empty_lines
96
87
  SupportedStyles:
97
- - for
98
- - each
99
- Style/FormatString:
100
- Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
101
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
102
- Enabled: false
103
- EnforcedStyle: format
88
+ - empty_lines
89
+ - no_empty_lines
90
+ Layout/EmptyLinesAroundClassBody:
91
+ Description: Keeps track of empty lines around class bodies.
92
+ Enabled: true
93
+ EnforcedStyle: no_empty_lines
104
94
  SupportedStyles:
105
- - format
106
- - sprintf
107
- - percent
108
- Style/GlobalVars:
109
- Description: Do not introduce global variables.
110
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
111
- Enabled: false
112
- AllowedVariables: []
113
- Style/GuardClause:
114
- Description: Check for conditionals that can be replaced with guard clauses
115
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
116
- Enabled: false
117
- MinBodyLength: 1
118
- Style/HashSyntax:
119
- Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
120
- 1, :b => 2 }.'
121
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
95
+ - empty_lines
96
+ - no_empty_lines
97
+ Layout/EmptyLinesAroundMethodBody:
98
+ Description: Keeps track of empty lines around method bodies.
122
99
  Enabled: true
123
- EnforcedStyle: ruby19
100
+ Layout/EmptyLinesAroundModuleBody:
101
+ Description: Keeps track of empty lines around module bodies.
102
+ Enabled: true
103
+ EnforcedStyle: no_empty_lines
124
104
  SupportedStyles:
125
- - ruby19
126
- - hash_rockets
127
- Style/IfUnlessModifier:
128
- Description: Favor modifier if/unless usage when you have a single-line body.
129
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
130
- Enabled: false
131
- MaxLineLength: 80
132
- Style/LambdaCall:
133
- Description: Use lambda.call(...) instead of lambda.(...).
134
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
135
- Enabled: false
136
- EnforcedStyle: call
105
+ - empty_lines
106
+ - no_empty_lines
107
+ Layout/EndOfLine:
108
+ Description: Use Unix-style line endings.
109
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
110
+ Enabled: true
111
+ Layout/ExtraSpacing:
112
+ Description: Do not use unnecessary spacing.
113
+ Enabled: true
114
+ Layout/FirstParameterIndentation:
115
+ Description: Checks the indentation of the first parameter in a method call.
116
+ Enabled: true
117
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
137
118
  SupportedStyles:
138
- - call
139
- - braces
140
- Style/Next:
141
- Description: Use `next` to skip iteration instead of a condition at the end.
142
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
143
- Enabled: false
144
- EnforcedStyle: skip_modifier_ifs
145
- MinBodyLength: 3
119
+ - consistent
120
+ - special_for_inner_method_call
121
+ - special_for_inner_method_call_in_parentheses
122
+ Layout/IndentArray:
123
+ Description: Checks the indentation of the first element in an array literal.
124
+ Enabled: true
125
+ Layout/IndentHash:
126
+ Description: Checks the indentation of the first key in a hash literal.
127
+ Enabled: true
128
+ EnforcedStyle: special_inside_parentheses
146
129
  SupportedStyles:
147
- - skip_modifier_ifs
148
- - always
149
- Style/NonNilCheck:
150
- Description: Checks for redundant nil checks.
151
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
130
+ - special_inside_parentheses
131
+ - consistent
132
+ Layout/IndentationConsistency:
133
+ Description: Keep indentation straight.
152
134
  Enabled: true
153
- IncludeSemanticChanges: false
154
- Style/MethodDefParentheses:
155
- Description: Checks if the method definitions have or don't have parentheses.
156
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
135
+ Layout/IndentationWidth:
136
+ Description: Use 2 spaces for indentation.
137
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
157
138
  Enabled: true
158
- EnforcedStyle: require_parentheses
139
+ Width: 2
140
+ Layout/LeadingCommentSpace:
141
+ Description: Comments should start with a space.
142
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
143
+ Enabled: true
144
+ Layout/MultilineBlockLayout:
145
+ Description: Ensures newlines after multiline block do statements.
146
+ Enabled: true
147
+ Layout/MultilineMethodCallIndentation:
148
+ Description: Checks indentation of method calls with the dot operator
149
+ that span more than one line.
150
+ Enabled: true
151
+ EnforcedStyle: indented
159
152
  SupportedStyles:
160
- - require_parentheses
161
- - require_no_parentheses
162
- Style/MethodName:
163
- Description: Use the configured style when naming methods.
164
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
153
+ - aligned
154
+ - indented
155
+ Layout/MultilineOperationIndentation:
156
+ Description: Checks indentation of binary operations that span more than one line.
165
157
  Enabled: true
166
- EnforcedStyle: snake_case
158
+ EnforcedStyle: indented
167
159
  SupportedStyles:
168
- - snake_case
169
- - camelCase
170
- Style/NumericLiterals:
171
- Description: Add underscores to large numeric literals to improve their readability.
172
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
173
- Enabled: false
174
- MinDigits: 5
175
- Style/NumericPredicate:
176
- Enabled: false
177
- Style/ParenthesesAroundCondition:
178
- Description: Don't use parentheses around the condition of an if/unless/while.
179
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
160
+ - aligned
161
+ - indented
162
+ Layout/SpaceAfterColon:
163
+ Description: Use spaces after colons.
164
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
180
165
  Enabled: true
181
- AllowSafeAssignment: true
182
- Style/PercentLiteralDelimiters:
183
- Description: Use `%`-literal delimiters consistently
184
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
185
- Enabled: false
186
- PreferredDelimiters:
187
- "%": "()"
188
- "%i": "()"
189
- "%q": "()"
190
- "%Q": "()"
191
- "%r": "{}"
192
- "%s": "()"
193
- "%w": "()"
194
- "%W": "()"
195
- "%x": "()"
196
- Style/PercentQLiterals:
197
- Description: Checks if uses of %Q/%q match the configured preference.
166
+ Layout/SpaceAfterComma:
167
+ Description: Use spaces after commas.
168
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
198
169
  Enabled: true
199
- EnforcedStyle: lower_case_q
200
- SupportedStyles:
201
- - lower_case_q
202
- - upper_case_q
203
- Style/PredicateName:
204
- Description: Check the names of predicate methods.
205
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
170
+ Layout/SpaceAfterMethodName:
171
+ Description: Do not put a space between a method name and the opening parenthesis
172
+ in a method definition.
173
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
206
174
  Enabled: true
207
- NamePrefix:
208
- - is_
209
- - has_
210
- - have_
211
- NamePrefixBlacklist:
212
- - is_
213
- Style/RaiseArgs:
214
- Description: Checks the arguments passed to raise/fail.
215
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
216
- Enabled: false
217
- EnforcedStyle: exploded
218
- SupportedStyles:
219
- - compact
220
- - exploded
221
- Style/RedundantReturn:
222
- Description: Don't use return where it's not required.
223
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
175
+ Layout/SpaceAfterNot:
176
+ Description: Tracks redundant space after the ! operator.
177
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
224
178
  Enabled: true
225
- AllowMultipleReturnValues: false
226
- Style/RegexpLiteral:
227
- Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
228
- characters. Use %r only for regular expressions matching more than `MaxSlashes`
229
- '/' character.
230
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
231
- Enabled: false
232
- Style/Semicolon:
233
- Description: Don't use semicolons to terminate expressions.
234
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
179
+ Layout/SpaceAfterSemicolon:
180
+ Description: Use spaces after semicolons.
181
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
235
182
  Enabled: true
236
- AllowAsExpressionSeparator: false
237
- Style/SignalException:
238
- Description: Checks for proper usage of fail and raise.
239
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
240
- Enabled: false
241
- EnforcedStyle: semantic
242
- SupportedStyles:
243
- - only_raise
244
- - only_fail
245
- - semantic
246
- Style/SingleLineBlockParams:
247
- Description: Enforces the names of some block params.
248
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
249
- Enabled: false
250
- Methods:
251
- - reduce:
252
- - a
253
- - e
254
- - inject:
255
- - a
256
- - e
257
- Style/SingleLineMethods:
258
- Description: Avoid single-line methods.
259
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
260
- Enabled: false
261
- AllowIfMethodIsEmpty: true
262
- Style/StringLiterals:
263
- Description: Checks if uses of quotes match the configured preference.
264
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
183
+ Layout/SpaceAroundBlockParameters:
184
+ Description: Checks the spacing inside and after block parameters pipes.
265
185
  Enabled: true
266
- EnforcedStyle: double_quotes
267
- SupportedStyles:
268
- - single_quotes
269
- - double_quotes
270
- Style/StringLiteralsInInterpolation:
271
- Description: Checks if uses of quotes inside expressions in interpolated strings
272
- match the configured preference.
186
+ EnforcedStyleInsidePipes: no_space
187
+ SupportedStylesInsidePipes:
188
+ - space
189
+ - no_space
190
+ Layout/SpaceAroundEqualsInParameterDefault:
191
+ Description: Checks that the equals signs in parameter default assignments have
192
+ or don't have surrounding space depending on configuration.
193
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
273
194
  Enabled: true
274
- EnforcedStyle: single_quotes
195
+ EnforcedStyle: space
275
196
  SupportedStyles:
276
- - single_quotes
277
- - double_quotes
278
- Style/SymbolProc:
279
- Description: Use symbols as procs instead of blocks when possible.
280
- Enabled: true
281
- IgnoredMethods:
282
- - respond_to
283
- Style/TrailingCommaInLiteral:
284
- Description: Checks for trailing comma in parameter lists and literals.
285
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
197
+ - space
198
+ - no_space
199
+ Layout/SpaceAroundKeyword:
200
+ Description: Use spaces after if/elsif/unless/while/until/case/when.
286
201
  Enabled: true
287
- EnforcedStyleForMultiline: comma
288
- SupportedStylesForMultiline:
289
- - comma
290
- - no_comma
291
- Style/TrailingCommaInArguments:
292
- Description: Checks for trailing comma in parameter lists and literals.
293
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
202
+ Layout/SpaceAroundOperators:
203
+ Description: Use spaces around operators.
204
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
294
205
  Enabled: true
295
- EnforcedStyleForMultiline: comma
296
- SupportedStylesForMultiline:
297
- - comma
298
- - no_comma
299
- Style/TrivialAccessors:
300
- Description: Prefer attr_* methods to trivial readers/writers.
301
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
302
- Enabled: false
303
- ExactNameMatch: false
304
- AllowPredicates: false
305
- AllowDSLWriters: false
306
- Whitelist:
307
- - to_ary
308
- - to_a
309
- - to_c
310
- - to_enum
311
- - to_h
312
- - to_hash
313
- - to_i
314
- - to_int
315
- - to_io
316
- - to_open
317
- - to_path
318
- - to_proc
319
- - to_r
320
- - to_regexp
321
- - to_str
322
- - to_s
323
- - to_sym
324
- Style/VariableName:
325
- Description: Use the configured style when naming variables.
326
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
206
+ Layout/SpaceBeforeBlockBraces:
207
+ Description: Checks that the left block brace has or doesn't have space before it.
327
208
  Enabled: true
328
- EnforcedStyle: snake_case
209
+ EnforcedStyle: space
329
210
  SupportedStyles:
330
- - snake_case
331
- - camelCase
332
- Style/WhileUntilModifier:
333
- Description: Favor modifier while/until usage when you have a single-line body.
334
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
335
- Enabled: false
336
- MaxLineLength: 80
337
- Style/WordArray:
338
- Description: Use %w or %W for arrays of words.
339
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
340
- Enabled: false
341
- MinSize: 0
342
- WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
343
- Metrics/AbcSize:
344
- Description: A calculated magnitude based on number of assignments, branches, and
345
- conditions.
346
- Enabled: true
347
- Max: 15
348
- Metrics/BlockLength:
349
- Exclude:
350
- - "spec/**/*"
351
- Metrics/BlockNesting:
352
- Description: Avoid excessive block nesting
353
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
211
+ - space
212
+ - no_space
213
+ Layout/SpaceBeforeComma:
214
+ Description: No spaces before commas.
354
215
  Enabled: true
355
- Max: 3
356
- Metrics/ClassLength:
357
- Description: Avoid classes longer than 100 lines of code.
358
- Enabled: false
359
- CountComments: false
360
- Max: 100
361
- Metrics/CyclomaticComplexity:
362
- Description: A complexity metric that is strongly correlated to the number of test
363
- cases needed to validate a method.
216
+ Layout/SpaceBeforeComment:
217
+ Description: Checks for missing space between code and a comment on the same line.
364
218
  Enabled: true
365
- Max: 6
366
- Metrics/LineLength:
367
- Description: Limit lines to 80 characters.
368
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
219
+ Layout/SpaceBeforeFirstArg:
220
+ Description: Checks that exactly one space is used between a method name and the
221
+ first argument for method calls without parentheses.
369
222
  Enabled: true
370
- Max: 80
371
- AllowURI: true
372
- URISchemes:
373
- - http
374
- - https
375
- Metrics/MethodLength:
376
- Description: Avoid methods longer than 10 lines of code.
377
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
223
+ Layout/SpaceBeforeSemicolon:
224
+ Description: No spaces before semicolons.
378
225
  Enabled: true
379
- CountComments: true
380
- Max: 10
381
- Exclude:
382
- - "spec/**/*"
383
- Metrics/ParameterLists:
384
- Description: Avoid long parameter lists.
385
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
226
+ Layout/SpaceInsideBlockBraces:
227
+ Description: Checks that block braces have or don't have surrounding space. For
228
+ blocks taking parameters, checks that the left brace has or doesn't have trailing
229
+ space.
386
230
  Enabled: true
387
- Max: 5
388
- CountKeywordArgs: true
389
- Metrics/PerceivedComplexity:
390
- Description: A complexity metric geared towards measuring complexity for a human
391
- reader.
231
+ EnforcedStyle: space
232
+ SupportedStyles:
233
+ - space
234
+ - no_space
235
+ EnforcedStyleForEmptyBraces: no_space
236
+ SpaceBeforeBlockParameters: true
237
+ Layout/SpaceInsideBrackets:
238
+ Description: No spaces after [ or before ].
239
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
392
240
  Enabled: true
393
- Max: 7
241
+ Layout/SpaceInsideHashLiteralBraces:
242
+ Description: Use spaces inside hash literal braces - or don't.
243
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
244
+ Enabled: true
245
+ EnforcedStyle: space
246
+ EnforcedStyleForEmptyBraces: no_space
247
+ SupportedStyles:
248
+ - space
249
+ - no_space
250
+ Layout/SpaceInsideParens:
251
+ Description: No spaces after ( or before ).
252
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
253
+ Enabled: true
254
+ Layout/SpaceInsideRangeLiteral:
255
+ Description: No spaces inside range literals.
256
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
257
+ Enabled: true
258
+ Layout/Tab:
259
+ Description: No hard tabs.
260
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
261
+ Enabled: true
262
+ Layout/TrailingBlankLines:
263
+ Description: Checks trailing blank lines and final newline.
264
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
265
+ Enabled: true
266
+ EnforcedStyle: final_newline
267
+ SupportedStyles:
268
+ - final_newline
269
+ - final_blank_line
270
+ Layout/TrailingWhitespace:
271
+ Description: Avoid trailing whitespace.
272
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
273
+ Enabled: true
274
+ Lint/AmbiguousOperator:
275
+ Description: Checks for ambiguous operators in the first argument of a method invocation
276
+ without parentheses.
277
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
278
+ Enabled: false
279
+ Lint/AmbiguousRegexpLiteral:
280
+ Description: Checks for ambiguous regexp literals in the first argument of a method
281
+ invocation without parenthesis.
282
+ Enabled: false
394
283
  Lint/AssignmentInCondition:
395
284
  Description: Don't use assignment in conditions.
396
285
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
397
286
  Enabled: false
398
287
  AllowSafeAssignment: true
399
- Lint/EndAlignment:
400
- Description: Align ends correctly.
288
+ Lint/BlockAlignment:
289
+ Description: Align block ends correctly.
290
+ Enabled: true
291
+ Lint/ConditionPosition:
292
+ Description: Checks for condition placed in a confusing position relative to the
293
+ keyword.
294
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
295
+ Enabled: false
296
+ Lint/Debugger:
297
+ Description: Check for debugger calls.
401
298
  Enabled: true
402
- EnforcedStyleAlignWith: keyword
403
- SupportedStylesAlignWith:
404
- - keyword
405
- - variable
406
299
  Lint/DefEndAlignment:
407
300
  Description: Align ends corresponding to defs correctly.
408
301
  Enabled: true
@@ -410,667 +303,766 @@ Lint/DefEndAlignment:
410
303
  SupportedStylesAlignWith:
411
304
  - start_of_line
412
305
  - def
413
- Rails/ActionFilter:
414
- Description: Enforces consistent use of action filter methods.
415
- Enabled: true
416
- EnforcedStyle: action
417
- SupportedStyles:
418
- - action
419
- - filter
420
- Include:
421
- - app/controllers/**/*.rb
422
- Rails/HasAndBelongsToMany:
423
- Description: Prefer has_many :through to has_and_belongs_to_many.
306
+ Lint/DeprecatedClassMethods:
307
+ Description: Check for deprecated class method calls.
308
+ Enabled: false
309
+ Lint/DuplicateMethods:
310
+ Description: Check for duplicate methods calls.
424
311
  Enabled: true
425
- Include:
426
- - app/models/**/*.rb
427
- Rails/HttpPositionalArguments:
312
+ Lint/ElseLayout:
313
+ Description: Check for odd code arrangement in an else block.
428
314
  Enabled: false
429
- Rails/Output:
430
- Description: Checks for calls to puts, print, etc.
315
+ Lint/EmptyEnsure:
316
+ Description: Checks for empty ensure block.
431
317
  Enabled: true
432
- Include:
433
- - app/**/*.rb
434
- - config/**/*.rb
435
- - db/**/*.rb
436
- - lib/**/*.rb
437
- Rails/ReadWriteAttribute:
438
- Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
318
+ Lint/EmptyInterpolation:
319
+ Description: Checks for empty string interpolation.
439
320
  Enabled: true
440
- Include:
441
- - app/models/**/*.rb
442
- Rails/ScopeArgs:
443
- Description: Checks the arguments of ActiveRecord scopes.
321
+ Lint/EndAlignment:
322
+ Description: Align ends correctly.
444
323
  Enabled: true
445
- Include:
446
- - app/models/**/*.rb
447
- Rails/Validation:
448
- Description: Use validates :attribute, hash of validations.
324
+ EnforcedStyleAlignWith: keyword
325
+ SupportedStylesAlignWith:
326
+ - keyword
327
+ - variable
328
+ Lint/EndInMethod:
329
+ Description: END blocks should not be placed inside method definitions.
449
330
  Enabled: true
450
- Include:
451
- - app/models/**/*.rb
452
- Style/InlineComment:
453
- Description: Avoid inline comments.
454
- Enabled: false
455
- Style/MethodCalledOnDoEndBlock:
456
- Description: Avoid chaining a method call on a do...end block.
457
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
458
- Enabled: false
459
- Style/SymbolArray:
460
- Description: Use %i or %I for arrays of symbols.
461
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
331
+ Lint/EnsureReturn:
332
+ Description: Do not use return in an ensure block.
333
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
334
+ Enabled: true
335
+ Lint/HandleExceptions:
336
+ Description: Don't suppress exception.
337
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
462
338
  Enabled: false
463
- Style/AccessorMethodName:
464
- Description: Check the naming of accessor methods for get_/set_.
339
+ Lint/InvalidCharacterLiteral:
340
+ Description: Checks for invalid character literals with a non-escaped whitespace
341
+ character.
465
342
  Enabled: false
466
- Style/Alias:
467
- Description: Use alias_method instead of alias.
468
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
343
+ Lint/LiteralInCondition:
344
+ Description: Checks of literals used in conditions.
469
345
  Enabled: false
470
- Style/ArrayJoin:
471
- Description: Use Array#join instead of Array#*.
472
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
346
+ Lint/LiteralInInterpolation:
347
+ Description: Checks for literals used in interpolation.
473
348
  Enabled: false
474
- Style/AsciiComments:
475
- Description: Use only ascii symbols in comments.
476
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
349
+ Lint/Loop:
350
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
351
+ for post-loop tests.
352
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
477
353
  Enabled: false
478
- Style/AsciiIdentifiers:
479
- Description: Use only ascii symbols in identifiers.
480
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
354
+ Lint/ParenthesesAsGroupedExpression:
355
+ Description: Checks for method calls with a space before the opening parenthesis.
356
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
481
357
  Enabled: false
482
- Style/Attr:
483
- Description: Checks for uses of Module#attr.
484
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
358
+ Lint/RequireParentheses:
359
+ Description: Use parentheses in the method call to avoid confusion about precedence.
485
360
  Enabled: false
486
- Style/BeginBlock:
487
- Description: Avoid the use of BEGIN blocks.
488
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
361
+ Lint/RescueException:
362
+ Description: Avoid rescuing the Exception class.
363
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
489
364
  Enabled: true
490
- Style/BlockComments:
491
- Description: Do not use block comments.
492
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
365
+ Lint/ShadowingOuterLocalVariable:
366
+ Description: Do not use the same name as outer local variable for block arguments
367
+ or block local variables.
493
368
  Enabled: true
494
- Style/BlockDelimiters:
495
- Description: Avoid using {...} for multi-line blocks (multiline chaining is always
496
- ugly). Prefer {...} over do...end for single-line blocks.
497
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
369
+ Lint/StringConversionInInterpolation:
370
+ Description: Checks for Object#to_s usage in string interpolation.
371
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
498
372
  Enabled: true
499
- Style/CaseEquality:
500
- Description: Avoid explicit use of the case equality operator(===).
501
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
502
- Enabled: false
503
- Style/CharacterLiteral:
504
- Description: Checks for uses of character literals.
505
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
373
+ Lint/UnderscorePrefixedVariableName:
374
+ Description: Do not use prefix `_` for a variable that is used.
506
375
  Enabled: false
507
- Style/ClassAndModuleCamelCase:
508
- Description: Use CamelCase for classes and modules.
509
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
376
+ Lint/UnreachableCode:
377
+ Description: Unreachable code.
510
378
  Enabled: true
511
- Style/ClassMethods:
512
- Description: Use self when defining module/class methods.
513
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
379
+ Lint/UnusedBlockArgument:
380
+ Description: Checks for unused block arguments.
381
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
514
382
  Enabled: true
515
- Style/ClassVars:
516
- Description: Avoid the use of class variables.
517
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
518
- Enabled: false
519
- Style/ColonMethodCall:
520
- Description: 'Do not use :: for method call.'
521
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
522
- Enabled: false
523
- Style/ConstantName:
524
- Description: Constants should use SCREAMING_SNAKE_CASE.
525
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
383
+ Lint/UnusedMethodArgument:
384
+ Description: Checks for unused method arguments.
385
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
526
386
  Enabled: true
527
- Style/DefWithParentheses:
528
- Description: Use def with parentheses when there are arguments.
529
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
387
+ Lint/UselessAccessModifier:
388
+ Description: Checks for useless access modifiers.
530
389
  Enabled: true
531
- Style/Documentation:
532
- Description: Document classes and non-namespace modules.
533
- Enabled: false
534
- Style/DoubleNegation:
535
- Description: Checks for uses of double negation (!!).
536
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
537
- Enabled: false
538
- Style/EachWithObject:
539
- Description: Prefer `each_with_object` over `inject` or `reduce`.
540
- Enabled: false
541
- Style/EmptyElse:
542
- Description: Avoid empty else-clauses.
390
+ Lint/UselessAssignment:
391
+ Description: Checks for useless assignment to a local variable.
392
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
543
393
  Enabled: true
544
- Style/EmptyLiteral:
545
- Description: Prefer literals to Array.new/Hash.new/String.new.
546
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
547
- Enabled: false
548
- Style/EndBlock:
549
- Description: Avoid the use of END blocks.
550
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
394
+ Lint/UselessComparison:
395
+ Description: Checks for comparison of something with itself.
551
396
  Enabled: true
552
- Style/EvenOdd:
553
- Description: Favor the use of Fixnum#even? && Fixnum#odd?
554
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
555
- Enabled: false
556
- Style/FlipFlop:
557
- Description: Checks for flip flops
558
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
559
- Enabled: false
560
- Style/IfWithSemicolon:
561
- Description: Do not use if x; .... Use the ternary operator instead.
562
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
563
- Enabled: false
564
- Style/InfiniteLoop:
565
- Description: Use Kernel#loop for infinite loops.
566
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
397
+ Lint/UselessElseWithoutRescue:
398
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
567
399
  Enabled: true
568
- Style/Lambda:
569
- Description: Use the new lambda literal syntax for single-line blocks.
570
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
571
- Enabled: false
572
- Style/LineEndConcatenation:
573
- Description: Use \ instead of + or << to concatenate two string literals at line
574
- end.
575
- Enabled: false
576
- Style/MethodCallWithoutArgsParentheses:
577
- Description: Do not use parentheses for method calls with no arguments.
578
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
400
+ Lint/UselessSetterCall:
401
+ Description: Checks for useless setter call to a local variable.
579
402
  Enabled: true
580
- Style/ModuleFunction:
581
- Description: Checks for usage of `extend self` in modules.
582
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
403
+ Lint/Void:
404
+ Description: Possible use of operator/literal/variable in void context.
583
405
  Enabled: false
584
- Style/MultilineIfThen:
585
- Description: Do not use then for multi-line if/unless.
586
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
406
+ Metrics/AbcSize:
407
+ Description: A calculated magnitude based on number of assignments, branches, and
408
+ conditions.
587
409
  Enabled: true
588
- Style/MultilineTernaryOperator:
589
- Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
590
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
410
+ Max: 15
411
+ Metrics/BlockLength:
412
+ Exclude:
413
+ - "spec/**/*"
414
+ Metrics/BlockNesting:
415
+ Description: Avoid excessive block nesting
416
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
591
417
  Enabled: true
592
- Style/NegatedIf:
593
- Description: Favor unless over if for negative conditions (or control flow or).
594
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
595
- Enabled: false
596
- Style/NegatedWhile:
597
- Description: Favor until over while for negative conditions.
598
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
418
+ Max: 3
419
+ Metrics/ClassLength:
420
+ Description: Avoid classes longer than 100 lines of code.
599
421
  Enabled: false
600
- Style/NestedTernaryOperator:
601
- Description: Use one expression per branch in a ternary operator.
602
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
422
+ CountComments: false
423
+ Max: 100
424
+ Metrics/CyclomaticComplexity:
425
+ Description: A complexity metric that is strongly correlated to the number of test
426
+ cases needed to validate a method.
603
427
  Enabled: true
604
- Style/NilComparison:
605
- Description: Prefer x.nil? to x == nil.
606
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
607
- Enabled: false
608
- Style/Not:
609
- Description: Use ! instead of not.
610
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
428
+ Max: 6
429
+ Metrics/LineLength:
430
+ Description: Limit lines to 80 characters.
431
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
432
+ Enabled: true
433
+ Max: 80
434
+ AllowURI: true
435
+ URISchemes:
436
+ - http
437
+ - https
438
+ Metrics/MethodLength:
439
+ Description: Avoid methods longer than 10 lines of code.
440
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
441
+ Enabled: true
442
+ CountComments: true
443
+ Max: 10
444
+ Exclude:
445
+ - "spec/**/*"
446
+ Metrics/ParameterLists:
447
+ Description: Avoid long parameter lists.
448
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
449
+ Enabled: true
450
+ Max: 5
451
+ CountKeywordArgs: true
452
+ Metrics/PerceivedComplexity:
453
+ Description: A complexity metric geared towards measuring complexity for a human
454
+ reader.
455
+ Enabled: true
456
+ Max: 7
457
+ Naming/AccessorMethodName:
458
+ Description: Check the naming of accessor methods for get_/set_.
611
459
  Enabled: false
612
- Style/OneLineConditional:
613
- Description: Favor the ternary operator(?:) over if/then/else/end constructs.
614
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
460
+ Naming/AsciiIdentifiers:
461
+ Description: Use only ascii symbols in identifiers.
462
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
615
463
  Enabled: false
616
- Style/OpMethod:
464
+ Naming/BinaryOperatorParameterName:
617
465
  Description: When defining binary operators, name the argument other.
618
466
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
619
467
  Enabled: false
620
- Style/PerlBackrefs:
621
- Description: Avoid Perl-style regex back references.
622
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
623
- Enabled: false
624
- Style/PreferredHashMethods:
625
- Description: Checks for use of deprecated Hash methods.
626
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
627
- Enabled: false
628
- Style/Proc:
629
- Description: Use proc instead of Proc.new.
630
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
468
+ Naming/ClassAndModuleCamelCase:
469
+ Description: Use CamelCase for classes and modules.
470
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
471
+ Enabled: true
472
+ Naming/ConstantName:
473
+ Description: Constants should use SCREAMING_SNAKE_CASE.
474
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
475
+ Enabled: true
476
+ Naming/FileName:
477
+ Description: Use snake_case for source file names.
478
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
631
479
  Enabled: false
632
- Style/RedundantBegin:
633
- Description: Don't use begin blocks when they are not needed.
634
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
480
+ Exclude: []
481
+ Naming/MethodName:
482
+ Description: Use the configured style when naming methods.
483
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
635
484
  Enabled: true
636
- Style/RedundantException:
637
- Description: Checks for an obsolete RuntimeException argument in raise/fail.
638
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
485
+ EnforcedStyle: snake_case
486
+ SupportedStyles:
487
+ - snake_case
488
+ - camelCase
489
+ Naming/PredicateName:
490
+ Description: Check the names of predicate methods.
491
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
639
492
  Enabled: true
640
- Style/RedundantSelf:
641
- Description: Don't use self where it's not needed.
642
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
493
+ NamePrefix:
494
+ - is_
495
+ - has_
496
+ - have_
497
+ NamePrefixBlacklist:
498
+ - is_
499
+ Naming/VariableName:
500
+ Description: Use the configured style when naming variables.
501
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
643
502
  Enabled: true
644
- Style/RescueModifier:
645
- Description: Avoid using rescue in its modifier form.
646
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
503
+ EnforcedStyle: snake_case
504
+ SupportedStyles:
505
+ - snake_case
506
+ - camelCase
507
+ Rails/ActionFilter:
508
+ Description: Enforces consistent use of action filter methods.
647
509
  Enabled: true
648
- Style/SelfAssignment:
649
- Description: Checks for places where self-assignment shorthand should have been
650
- used.
651
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
510
+ EnforcedStyle: action
511
+ SupportedStyles:
512
+ - action
513
+ - filter
514
+ Include:
515
+ - app/controllers/**/*.rb
516
+ Rails/Delegate:
517
+ Description: Prefer delegate method for delegations.
652
518
  Enabled: false
653
- Style/SpecialGlobalVars:
654
- Description: Avoid Perl-style global variables.
655
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
519
+ Rails/HasAndBelongsToMany:
520
+ Description: Prefer has_many :through to has_and_belongs_to_many.
521
+ Enabled: true
522
+ Include:
523
+ - app/models/**/*.rb
524
+ Rails/HttpPositionalArguments:
656
525
  Enabled: false
657
- Style/StructInheritance:
658
- Description: Checks for inheritance from Struct.new.
659
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
526
+ Rails/Output:
527
+ Description: Checks for calls to puts, print, etc.
660
528
  Enabled: true
661
- Style/UnlessElse:
662
- Description: Do not use unless with else. Rewrite these with the positive case first.
663
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
529
+ Include:
530
+ - app/**/*.rb
531
+ - config/**/*.rb
532
+ - db/**/*.rb
533
+ - lib/**/*.rb
534
+ Rails/ReadWriteAttribute:
535
+ Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
664
536
  Enabled: true
665
- Style/UnneededCapitalW:
666
- Description: Checks for %W when interpolation is not needed.
537
+ Include:
538
+ - app/models/**/*.rb
539
+ Rails/ScopeArgs:
540
+ Description: Checks the arguments of ActiveRecord scopes.
667
541
  Enabled: true
668
- Style/UnneededPercentQ:
669
- Description: Checks for %q/%Q when single quotes or double quotes would do.
670
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
542
+ Include:
543
+ - app/models/**/*.rb
544
+ Rails/Validation:
545
+ Description: Use validates :attribute, hash of validations.
671
546
  Enabled: true
672
- Style/CommandLiteral:
673
- Description: Checks for %x when `` would do.
674
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
547
+ Include:
548
+ - app/models/**/*.rb
549
+ Security/Eval:
550
+ Description: The use of eval represents a serious security risk.
675
551
  Enabled: true
676
- Style/VariableInterpolation:
677
- Description: Don't interpolate global, instance and class variables directly in
678
- strings.
679
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
680
- Enabled: false
681
- Style/WhenThen:
682
- Description: Use when x then ... for one-line cases.
683
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
552
+ Style/Alias:
553
+ Description: Use alias_method instead of alias.
554
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
684
555
  Enabled: false
685
- Style/WhileUntilDo:
686
- Description: Checks for redundant do after while or until.
687
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
688
- Enabled: true
689
- Layout/AccessModifierIndentation:
690
- Description: Check indentation of private/protected visibility modifiers.
691
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
556
+ Style/AndOr:
557
+ Description: Use &&/|| instead of and/or.
558
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
692
559
  Enabled: true
693
- EnforcedStyle: indent
560
+ EnforcedStyle: always
694
561
  SupportedStyles:
695
- - outdent
696
- - indent
697
- Layout/AlignHash:
698
- Description: Align the elements of a hash literal if they span more than one line.
699
- Enabled: true
700
- EnforcedHashRocketStyle: key
701
- EnforcedColonStyle: key
702
- EnforcedLastArgumentHashStyle: always_inspect
703
- SupportedLastArgumentHashStyles:
704
- - always_inspect
705
- - always_ignore
706
- - ignore_implicit
707
- - ignore_explicit
708
- Layout/AlignParameters:
709
- Description: Align the parameters of a method call if they span more than one line.
710
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
711
- Enabled: true
712
- EnforcedStyle: with_first_parameter
713
- SupportedStyles:
714
- - with_first_parameter
715
- - with_fixed_indentation
716
- Layout/CaseIndentation:
717
- Description: Indentation of when in a case/when/[else/]end.
718
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
562
+ - always
563
+ - conditionals
564
+ Style/ArrayJoin:
565
+ Description: Use Array#join instead of Array#*.
566
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
567
+ Enabled: false
568
+ Style/AsciiComments:
569
+ Description: Use only ascii symbols in comments.
570
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
571
+ Enabled: false
572
+ Style/Attr:
573
+ Description: Checks for uses of Module#attr.
574
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
575
+ Enabled: false
576
+ Style/BarePercentLiterals:
577
+ Description: Checks if usage of %() or %Q() matches configuration.
578
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
719
579
  Enabled: true
720
- EnforcedStyle: case
580
+ EnforcedStyle: bare_percent
721
581
  SupportedStyles:
722
- - case
723
- - end
724
- IndentOneStep: false
725
- Layout/CommentIndentation:
726
- Description: Indentation of comments.
582
+ - percent_q
583
+ - bare_percent
584
+ Style/BeginBlock:
585
+ Description: Avoid the use of BEGIN blocks.
586
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
727
587
  Enabled: true
728
- Layout/DotPosition:
729
- Description: Checks the position of the dot in multi-line method calls.
730
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
588
+ Style/BlockComments:
589
+ Description: Do not use block comments.
590
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
731
591
  Enabled: true
732
- EnforcedStyle: trailing
733
- SupportedStyles:
734
- - leading
735
- - trailing
736
- Layout/EmptyLineBetweenDefs:
737
- Description: Use empty lines between defs.
738
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
592
+ Style/BlockDelimiters:
593
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
594
+ ugly). Prefer {...} over do...end for single-line blocks.
595
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
739
596
  Enabled: true
740
- AllowAdjacentOneLineDefs: false
741
- Layout/EmptyLinesAroundBlockBody:
742
- Description: Keeps track of empty lines around block bodies.
597
+ Style/BracesAroundHashParameters:
598
+ Description: Enforce braces style around hash parameters.
743
599
  Enabled: true
744
- EnforcedStyle: no_empty_lines
600
+ EnforcedStyle: no_braces
745
601
  SupportedStyles:
746
- - empty_lines
747
- - no_empty_lines
748
- Layout/EmptyLinesAroundClassBody:
749
- Description: Keeps track of empty lines around class bodies.
750
- Enabled: true
751
- EnforcedStyle: no_empty_lines
602
+ - braces
603
+ - no_braces
604
+ - context_dependent
605
+ Style/CaseEquality:
606
+ Description: Avoid explicit use of the case equality operator(===).
607
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
608
+ Enabled: false
609
+ Style/CharacterLiteral:
610
+ Description: Checks for uses of character literals.
611
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
612
+ Enabled: false
613
+ Style/ClassAndModuleChildren:
614
+ Description: Checks style of children classes and modules.
615
+ Enabled: false
616
+ EnforcedStyle: nested
752
617
  SupportedStyles:
753
- - empty_lines
754
- - no_empty_lines
755
- Layout/EmptyLinesAroundModuleBody:
756
- Description: Keeps track of empty lines around module bodies.
618
+ - nested
619
+ - compact
620
+ Style/ClassCheck:
621
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
757
622
  Enabled: true
758
- EnforcedStyle: no_empty_lines
623
+ EnforcedStyle: is_a?
759
624
  SupportedStyles:
760
- - empty_lines
761
- - no_empty_lines
762
- Layout/FirstParameterIndentation:
763
- Description: Checks the indentation of the first parameter in a method call.
625
+ - is_a?
626
+ - kind_of?
627
+ Style/ClassMethods:
628
+ Description: Use self when defining module/class methods.
629
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
764
630
  Enabled: true
765
- EnforcedStyle: special_for_inner_method_call_in_parentheses
766
- SupportedStyles:
767
- - consistent
768
- - special_for_inner_method_call
769
- - special_for_inner_method_call_in_parentheses
770
- Layout/IndentationWidth:
771
- Description: Use 2 spaces for indentation.
772
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
631
+ Style/ClassVars:
632
+ Description: Avoid the use of class variables.
633
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
634
+ Enabled: false
635
+ Style/CollectionMethods:
636
+ Description: Preferred collection methods.
637
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
773
638
  Enabled: true
774
- Width: 2
775
- Layout/IndentHash:
776
- Description: Checks the indentation of the first key in a hash literal.
639
+ PreferredMethods:
640
+ collect: map
641
+ collect!: map!
642
+ inject: reduce
643
+ detect: find
644
+ find_all: select
645
+ find: detect
646
+ Style/ColonMethodCall:
647
+ Description: 'Do not use :: for method call.'
648
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
649
+ Enabled: false
650
+ Style/CommandLiteral:
651
+ Description: Checks for %x when `` would do.
652
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
777
653
  Enabled: true
778
- EnforcedStyle: special_inside_parentheses
779
- SupportedStyles:
780
- - special_inside_parentheses
781
- - consistent
782
- Layout/MultilineMethodCallIndentation:
783
- Description: Checks indentation of method calls with the dot operator
784
- that span more than one line.
654
+ Style/CommentAnnotation:
655
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
656
+ REVIEW).
657
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
658
+ Enabled: false
659
+ Keywords:
660
+ - TODO
661
+ - FIXME
662
+ - OPTIMIZE
663
+ - HACK
664
+ - REVIEW
665
+ Style/DefWithParentheses:
666
+ Description: Use def with parentheses when there are arguments.
667
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
785
668
  Enabled: true
786
- EnforcedStyle: indented
787
- SupportedStyles:
788
- - aligned
789
- - indented
790
- Layout/MultilineOperationIndentation:
791
- Description: Checks indentation of binary operations that span more than one line.
669
+ Style/Documentation:
670
+ Description: Document classes and non-namespace modules.
671
+ Enabled: false
672
+ Style/DoubleNegation:
673
+ Description: Checks for uses of double negation (!!).
674
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
675
+ Enabled: false
676
+ Style/EachWithObject:
677
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
678
+ Enabled: false
679
+ Style/EmptyElse:
680
+ Description: Avoid empty else-clauses.
792
681
  Enabled: true
793
- EnforcedStyle: indented
682
+ Style/EmptyLiteral:
683
+ Description: Prefer literals to Array.new/Hash.new/String.new.
684
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
685
+ Enabled: false
686
+ Style/Encoding:
687
+ Description: Use UTF-8 as the source file encoding.
688
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
689
+ Enabled: false
690
+ EnforcedStyle: always
794
691
  SupportedStyles:
795
- - aligned
796
- - indented
797
- Layout/SpaceAroundBlockParameters:
798
- Description: Checks the spacing inside and after block parameters pipes.
799
- Enabled: true
800
- EnforcedStyleInsidePipes: no_space
801
- SupportedStylesInsidePipes:
802
- - space
803
- - no_space
804
- Layout/SpaceAroundEqualsInParameterDefault:
805
- Description: Checks that the equals signs in parameter default assignments have
806
- or don't have surrounding space depending on configuration.
807
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
692
+ - when_needed
693
+ - always
694
+ Style/EndBlock:
695
+ Description: Avoid the use of END blocks.
696
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
808
697
  Enabled: true
809
- EnforcedStyle: space
810
- SupportedStyles:
811
- - space
812
- - no_space
813
- Layout/SpaceBeforeBlockBraces:
814
- Description: Checks that the left block brace has or doesn't have space before it.
698
+ Style/EvenOdd:
699
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
700
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
701
+ Enabled: false
702
+ Style/FlipFlop:
703
+ Description: Checks for flip flops
704
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
705
+ Enabled: false
706
+ Style/For:
707
+ Description: Checks use of for or each in multiline loops.
708
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
815
709
  Enabled: true
816
- EnforcedStyle: space
710
+ EnforcedStyle: each
817
711
  SupportedStyles:
818
- - space
819
- - no_space
820
- Layout/SpaceBeforeFirstArg:
821
- Description: Put a space between a method name and the first argument in a method
822
- call without parentheses.
823
- Enabled: true
824
- Layout/SpaceInsideBlockBraces:
825
- Description: Checks that block braces have or don't have surrounding space. For
826
- blocks taking parameters, checks that the left brace has or doesn't have trailing
827
- space.
828
- Enabled: true
829
- EnforcedStyle: space
712
+ - for
713
+ - each
714
+ Style/FormatString:
715
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
716
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
717
+ Enabled: false
718
+ EnforcedStyle: format
830
719
  SupportedStyles:
831
- - space
832
- - no_space
833
- EnforcedStyleForEmptyBraces: no_space
834
- SpaceBeforeBlockParameters: true
835
- Layout/SpaceInsideHashLiteralBraces:
836
- Description: Use spaces inside hash literal braces - or don't.
837
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
720
+ - format
721
+ - sprintf
722
+ - percent
723
+ Style/FrozenStringLiteralComment:
724
+ Description: >-
725
+ Add the frozen_string_literal comment to the top of files
726
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
727
+ Enabled: false
728
+ Style/GlobalVars:
729
+ Description: Do not introduce global variables.
730
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
731
+ Enabled: false
732
+ AllowedVariables: []
733
+ Style/GuardClause:
734
+ Description: Check for conditionals that can be replaced with guard clauses
735
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
736
+ Enabled: false
737
+ MinBodyLength: 1
738
+ Style/HashSyntax:
739
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
740
+ 1, :b => 2 }.'
741
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
838
742
  Enabled: true
839
- EnforcedStyle: space
840
- EnforcedStyleForEmptyBraces: no_space
743
+ EnforcedStyle: ruby19
841
744
  SupportedStyles:
842
- - space
843
- - no_space
844
- Layout/TrailingBlankLines:
845
- Description: Checks trailing blank lines and final newline.
846
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
745
+ - ruby19
746
+ - hash_rockets
747
+ Style/IfUnlessModifier:
748
+ Description: Favor modifier if/unless usage when you have a single-line body.
749
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
750
+ Enabled: false
751
+ MaxLineLength: 80
752
+ Style/IfWithSemicolon:
753
+ Description: Do not use if x; .... Use the ternary operator instead.
754
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
755
+ Enabled: false
756
+ Style/InfiniteLoop:
757
+ Description: Use Kernel#loop for infinite loops.
758
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
847
759
  Enabled: true
848
- EnforcedStyle: final_newline
760
+ Style/InlineComment:
761
+ Description: Avoid inline comments.
762
+ Enabled: false
763
+ Style/Lambda:
764
+ Description: Use the new lambda literal syntax for single-line blocks.
765
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
766
+ Enabled: false
767
+ Style/LambdaCall:
768
+ Description: Use lambda.call(...) instead of lambda.(...).
769
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
770
+ Enabled: false
771
+ EnforcedStyle: call
849
772
  SupportedStyles:
850
- - final_newline
851
- - final_blank_line
852
- Layout/ExtraSpacing:
853
- Description: Do not use unnecessary spacing.
854
- Enabled: true
855
- Layout/AlignArray:
856
- Description: Align the elements of an array literal if they span more than one line.
857
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
858
- Enabled: true
859
- Layout/BlockEndNewline:
860
- Description: Put end statement of multiline block on its own line.
861
- Enabled: true
862
- Layout/CommentIndentation:
863
- Description: Indentation of comments.
864
- Enabled: true
865
- Layout/ElseAlignment:
866
- Description: Align elses and elsifs correctly.
867
- Enabled: true
868
- Layout/EmptyLines:
869
- Description: Don't use several empty lines in a row.
870
- Enabled: true
871
- Layout/EmptyLinesAroundAccessModifier:
872
- Description: Keep blank lines around access modifiers.
873
- Enabled: true
874
- Layout/EmptyLinesAroundMethodBody:
875
- Description: Keeps track of empty lines around method bodies.
876
- Enabled: true
877
- Layout/EndOfLine:
878
- Description: Use Unix-style line endings.
879
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
880
- Enabled: true
881
- Layout/IndentationConsistency:
882
- Description: Keep indentation straight.
883
- Enabled: true
884
- Layout/IndentArray:
885
- Description: Checks the indentation of the first element in an array literal.
886
- Enabled: true
887
- Layout/LeadingCommentSpace:
888
- Description: Comments should start with a space.
889
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
890
- Enabled: true
891
- Layout/MultilineBlockLayout:
892
- Description: Ensures newlines after multiline block do statements.
893
- Enabled: true
894
- Layout/SpaceBeforeFirstArg:
895
- Description: Checks that exactly one space is used between a method name and the
896
- first argument for method calls without parentheses.
897
- Enabled: true
898
- Layout/SpaceAfterColon:
899
- Description: Use spaces after colons.
900
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
901
- Enabled: true
902
- Layout/SpaceAfterComma:
903
- Description: Use spaces after commas.
904
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
905
- Enabled: true
906
- Layout/SpaceAroundKeyword:
907
- Description: Use spaces after if/elsif/unless/while/until/case/when.
908
- Enabled: true
909
- Layout/SpaceAfterMethodName:
910
- Description: Do not put a space between a method name and the opening parenthesis
911
- in a method definition.
912
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
913
- Enabled: true
914
- Layout/SpaceAfterNot:
915
- Description: Tracks redundant space after the ! operator.
916
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
917
- Enabled: true
918
- Layout/SpaceAfterSemicolon:
919
- Description: Use spaces after semicolons.
920
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
921
- Enabled: true
922
- Layout/SpaceBeforeComma:
923
- Description: No spaces before commas.
924
- Enabled: true
925
- Layout/SpaceBeforeComment:
926
- Description: Checks for missing space between code and a comment on the same line.
927
- Enabled: true
928
- Layout/SpaceBeforeSemicolon:
929
- Description: No spaces before semicolons.
930
- Enabled: true
931
- Layout/SpaceAroundOperators:
932
- Description: Use spaces around operators.
933
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
934
- Enabled: true
935
- Layout/SpaceAroundKeyword:
936
- Description: Put a space before the modifier keyword.
773
+ - call
774
+ - braces
775
+ Style/LineEndConcatenation:
776
+ Description: Use \ instead of + or << to concatenate two string literals at line
777
+ end.
778
+ Enabled: false
779
+ Style/MethodCallWithoutArgsParentheses:
780
+ Description: Do not use parentheses for method calls with no arguments.
781
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
937
782
  Enabled: true
938
- Layout/SpaceInsideBrackets:
939
- Description: No spaces after [ or before ].
940
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
783
+ Style/MethodCalledOnDoEndBlock:
784
+ Description: Avoid chaining a method call on a do...end block.
785
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
786
+ Enabled: false
787
+ Style/MethodDefParentheses:
788
+ Description: Checks if the method definitions have or don't have parentheses.
789
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
941
790
  Enabled: true
942
- Layout/SpaceInsideParens:
943
- Description: No spaces after ( or before ).
944
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
791
+ EnforcedStyle: require_parentheses
792
+ SupportedStyles:
793
+ - require_parentheses
794
+ - require_no_parentheses
795
+ Style/ModuleFunction:
796
+ Description: Checks for usage of `extend self` in modules.
797
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
798
+ Enabled: false
799
+ Style/MultilineIfThen:
800
+ Description: Do not use then for multi-line if/unless.
801
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
945
802
  Enabled: true
946
- Layout/SpaceInsideRangeLiteral:
947
- Description: No spaces inside range literals.
948
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
803
+ Style/MultilineTernaryOperator:
804
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
805
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
949
806
  Enabled: true
950
- Layout/Tab:
951
- Description: No hard tabs.
952
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
807
+ Style/NegatedIf:
808
+ Description: Favor unless over if for negative conditions (or control flow or).
809
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
810
+ Enabled: false
811
+ Style/NegatedWhile:
812
+ Description: Favor until over while for negative conditions.
813
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
814
+ Enabled: false
815
+ Style/NestedTernaryOperator:
816
+ Description: Use one expression per branch in a ternary operator.
817
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
953
818
  Enabled: true
954
- Layout/TrailingWhitespace:
955
- Description: Avoid trailing whitespace.
956
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
819
+ Style/Next:
820
+ Description: Use `next` to skip iteration instead of a condition at the end.
821
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
822
+ Enabled: false
823
+ EnforcedStyle: skip_modifier_ifs
824
+ MinBodyLength: 3
825
+ SupportedStyles:
826
+ - skip_modifier_ifs
827
+ - always
828
+ Style/NilComparison:
829
+ Description: Prefer x.nil? to x == nil.
830
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
831
+ Enabled: false
832
+ Style/NonNilCheck:
833
+ Description: Checks for redundant nil checks.
834
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
957
835
  Enabled: true
958
- Lint/AmbiguousOperator:
959
- Description: Checks for ambiguous operators in the first argument of a method invocation
960
- without parentheses.
961
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
836
+ IncludeSemanticChanges: false
837
+ Style/Not:
838
+ Description: Use ! instead of not.
839
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
962
840
  Enabled: false
963
- Lint/AmbiguousRegexpLiteral:
964
- Description: Checks for ambiguous regexp literals in the first argument of a method
965
- invocation without parenthesis.
841
+ Style/NumericLiterals:
842
+ Description: Add underscores to large numeric literals to improve their readability.
843
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
966
844
  Enabled: false
967
- Lint/BlockAlignment:
968
- Description: Align block ends correctly.
845
+ MinDigits: 5
846
+ Style/NumericPredicate:
847
+ Enabled: false
848
+ Style/OneLineConditional:
849
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
850
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
851
+ Enabled: false
852
+ Style/ParenthesesAroundCondition:
853
+ Description: Don't use parentheses around the condition of an if/unless/while.
854
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
855
+ Enabled: true
856
+ AllowSafeAssignment: true
857
+ Style/PercentLiteralDelimiters:
858
+ Description: Use `%`-literal delimiters consistently
859
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
860
+ Enabled: false
861
+ PreferredDelimiters:
862
+ "%": "()"
863
+ "%i": "()"
864
+ "%q": "()"
865
+ "%Q": "()"
866
+ "%r": "{}"
867
+ "%s": "()"
868
+ "%w": "()"
869
+ "%W": "()"
870
+ "%x": "()"
871
+ Style/PercentQLiterals:
872
+ Description: Checks if uses of %Q/%q match the configured preference.
969
873
  Enabled: true
970
- Lint/ConditionPosition:
971
- Description: Checks for condition placed in a confusing position relative to the
972
- keyword.
973
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
874
+ EnforcedStyle: lower_case_q
875
+ SupportedStyles:
876
+ - lower_case_q
877
+ - upper_case_q
878
+ Style/PerlBackrefs:
879
+ Description: Avoid Perl-style regex back references.
880
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
974
881
  Enabled: false
975
- Lint/Debugger:
976
- Description: Check for debugger calls.
977
- Enabled: true
978
- Lint/DeprecatedClassMethods:
979
- Description: Check for deprecated class method calls.
882
+ Style/PreferredHashMethods:
883
+ Description: Checks for use of deprecated Hash methods.
884
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
980
885
  Enabled: false
981
- Lint/DuplicateMethods:
982
- Description: Check for duplicate methods calls.
983
- Enabled: true
984
- Lint/ElseLayout:
985
- Description: Check for odd code arrangement in an else block.
886
+ Style/Proc:
887
+ Description: Use proc instead of Proc.new.
888
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
986
889
  Enabled: false
987
- Lint/EmptyEnsure:
988
- Description: Checks for empty ensure block.
890
+ Style/RaiseArgs:
891
+ Description: Checks the arguments passed to raise/fail.
892
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
893
+ Enabled: false
894
+ EnforcedStyle: exploded
895
+ SupportedStyles:
896
+ - compact
897
+ - exploded
898
+ Style/RedundantBegin:
899
+ Description: Don't use begin blocks when they are not needed.
900
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
989
901
  Enabled: true
990
- Lint/EmptyInterpolation:
991
- Description: Checks for empty string interpolation.
902
+ Style/RedundantException:
903
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
904
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
992
905
  Enabled: true
993
- Lint/EndInMethod:
994
- Description: END blocks should not be placed inside method definitions.
906
+ Style/RedundantReturn:
907
+ Description: Don't use return where it's not required.
908
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
995
909
  Enabled: true
996
- Lint/EnsureReturn:
997
- Description: Do not use return in an ensure block.
998
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
910
+ AllowMultipleReturnValues: false
911
+ Style/RedundantSelf:
912
+ Description: Don't use self where it's not needed.
913
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
999
914
  Enabled: true
1000
- Lint/HandleExceptions:
1001
- Description: Don't suppress exception.
1002
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
1003
- Enabled: false
1004
- Lint/InvalidCharacterLiteral:
1005
- Description: Checks for invalid character literals with a non-escaped whitespace
1006
- character.
915
+ Style/RegexpLiteral:
916
+ Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
917
+ characters. Use %r only for regular expressions matching more than `MaxSlashes`
918
+ '/' character.
919
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
1007
920
  Enabled: false
1008
- Lint/LiteralInCondition:
1009
- Description: Checks of literals used in conditions.
921
+ Style/RescueModifier:
922
+ Description: Avoid using rescue in its modifier form.
923
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
924
+ Enabled: true
925
+ Style/SelfAssignment:
926
+ Description: Checks for places where self-assignment shorthand should have been
927
+ used.
928
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
1010
929
  Enabled: false
1011
- Lint/LiteralInInterpolation:
1012
- Description: Checks for literals used in interpolation.
930
+ Style/Semicolon:
931
+ Description: Don't use semicolons to terminate expressions.
932
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
933
+ Enabled: true
934
+ AllowAsExpressionSeparator: false
935
+ Style/SignalException:
936
+ Description: Checks for proper usage of fail and raise.
937
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
1013
938
  Enabled: false
1014
- Lint/Loop:
1015
- Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1016
- for post-loop tests.
1017
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
939
+ EnforcedStyle: semantic
940
+ SupportedStyles:
941
+ - only_raise
942
+ - only_fail
943
+ - semantic
944
+ Style/SingleLineBlockParams:
945
+ Description: Enforces the names of some block params.
946
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
1018
947
  Enabled: false
1019
- Lint/ParenthesesAsGroupedExpression:
1020
- Description: Checks for method calls with a space before the opening parenthesis.
1021
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
948
+ Methods:
949
+ - reduce:
950
+ - a
951
+ - e
952
+ - inject:
953
+ - a
954
+ - e
955
+ Style/SingleLineMethods:
956
+ Description: Avoid single-line methods.
957
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
1022
958
  Enabled: false
1023
- Lint/RequireParentheses:
1024
- Description: Use parentheses in the method call to avoid confusion about precedence.
959
+ AllowIfMethodIsEmpty: true
960
+ Style/SpecialGlobalVars:
961
+ Description: Avoid Perl-style global variables.
962
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
1025
963
  Enabled: false
1026
- Lint/RescueException:
1027
- Description: Avoid rescuing the Exception class.
1028
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
964
+ Style/StringLiterals:
965
+ Description: Checks if uses of quotes match the configured preference.
966
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
1029
967
  Enabled: true
1030
- Lint/ShadowingOuterLocalVariable:
1031
- Description: Do not use the same name as outer local variable for block arguments
1032
- or block local variables.
968
+ EnforcedStyle: double_quotes
969
+ SupportedStyles:
970
+ - single_quotes
971
+ - double_quotes
972
+ Style/StringLiteralsInInterpolation:
973
+ Description: Checks if uses of quotes inside expressions in interpolated strings
974
+ match the configured preference.
1033
975
  Enabled: true
1034
- Lint/StringConversionInInterpolation:
1035
- Description: Checks for Object#to_s usage in string interpolation.
1036
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
976
+ EnforcedStyle: single_quotes
977
+ SupportedStyles:
978
+ - single_quotes
979
+ - double_quotes
980
+ Style/StructInheritance:
981
+ Description: Checks for inheritance from Struct.new.
982
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
1037
983
  Enabled: true
1038
- Lint/UnderscorePrefixedVariableName:
1039
- Description: Do not use prefix `_` for a variable that is used.
984
+ Style/SymbolArray:
985
+ Description: Use %i or %I for arrays of symbols.
986
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
1040
987
  Enabled: false
1041
- Lint/UnusedBlockArgument:
1042
- Description: Checks for unused block arguments.
1043
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1044
- Enabled: true
1045
- Lint/UnusedMethodArgument:
1046
- Description: Checks for unused method arguments.
1047
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1048
- Enabled: true
1049
- Lint/UnreachableCode:
1050
- Description: Unreachable code.
988
+ Style/SymbolProc:
989
+ Description: Use symbols as procs instead of blocks when possible.
1051
990
  Enabled: true
1052
- Lint/UselessAccessModifier:
1053
- Description: Checks for useless access modifiers.
991
+ IgnoredMethods:
992
+ - respond_to
993
+ Style/TrailingCommaInArguments:
994
+ Description: Checks for trailing comma in parameter lists and literals.
995
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
1054
996
  Enabled: true
1055
- Lint/UselessAssignment:
1056
- Description: Checks for useless assignment to a local variable.
1057
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
997
+ EnforcedStyleForMultiline: comma
998
+ SupportedStylesForMultiline:
999
+ - comma
1000
+ - no_comma
1001
+ Style/TrailingCommaInLiteral:
1002
+ Description: Checks for trailing comma in parameter lists and literals.
1003
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
1058
1004
  Enabled: true
1059
- Lint/UselessComparison:
1060
- Description: Checks for comparison of something with itself.
1005
+ EnforcedStyleForMultiline: comma
1006
+ SupportedStylesForMultiline:
1007
+ - comma
1008
+ - no_comma
1009
+ Style/TrivialAccessors:
1010
+ Description: Prefer attr_* methods to trivial readers/writers.
1011
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
1012
+ Enabled: false
1013
+ ExactNameMatch: false
1014
+ AllowPredicates: false
1015
+ AllowDSLWriters: false
1016
+ Whitelist:
1017
+ - to_ary
1018
+ - to_a
1019
+ - to_c
1020
+ - to_enum
1021
+ - to_h
1022
+ - to_hash
1023
+ - to_i
1024
+ - to_int
1025
+ - to_io
1026
+ - to_open
1027
+ - to_path
1028
+ - to_proc
1029
+ - to_r
1030
+ - to_regexp
1031
+ - to_str
1032
+ - to_s
1033
+ - to_sym
1034
+ Style/UnlessElse:
1035
+ Description: Do not use unless with else. Rewrite these with the positive case first.
1036
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
1061
1037
  Enabled: true
1062
- Lint/UselessElseWithoutRescue:
1063
- Description: Checks for useless `else` in `begin..end` without `rescue`.
1038
+ Style/UnneededCapitalW:
1039
+ Description: Checks for %W when interpolation is not needed.
1064
1040
  Enabled: true
1065
- Lint/UselessSetterCall:
1066
- Description: Checks for useless setter call to a local variable.
1041
+ Style/UnneededPercentQ:
1042
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
1043
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
1067
1044
  Enabled: true
1068
- Lint/Void:
1069
- Description: Possible use of operator/literal/variable in void context.
1045
+ Style/VariableInterpolation:
1046
+ Description: Don't interpolate global, instance and class variables directly in
1047
+ strings.
1048
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
1070
1049
  Enabled: false
1071
- Rails/Delegate:
1072
- Description: Prefer delegate method for delegations.
1050
+ Style/WhenThen:
1051
+ Description: Use when x then ... for one-line cases.
1052
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
1073
1053
  Enabled: false
1074
- Security/Eval:
1075
- Description: The use of eval represents a serious security risk.
1054
+ Style/WhileUntilDo:
1055
+ Description: Checks for redundant do after while or until.
1056
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
1076
1057
  Enabled: true
1058
+ Style/WhileUntilModifier:
1059
+ Description: Favor modifier while/until usage when you have a single-line body.
1060
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
1061
+ Enabled: false
1062
+ MaxLineLength: 80
1063
+ Style/WordArray:
1064
+ Description: Use %w or %W for arrays of words.
1065
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
1066
+ Enabled: false
1067
+ MinSize: 0
1068
+ WordRegex: !ruby/regexp /\A[\p{Word}]+\z/