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 +4 -4
- data/.codeclimate.yml +1 -1
- data/.editorconfig +1 -1
- data/.rubocop.yml +895 -903
- data/.travis.yml +1 -1
- data/CHANGELOG.adoc +8 -1
- data/README.adoc +15 -15
- data/bin/cucumber +18 -0
- data/gemfiles/common.gemfile +8 -5
- data/gemfiles/rails-4.0.gemfile +3 -2
- data/gemfiles/rails-4.1.gemfile +3 -2
- data/gemfiles/rails-4.2.gemfile +3 -2
- data/gemfiles/rails-5.0.gemfile +3 -2
- data/gemfiles/rails-5.1.gemfile +3 -2
- data/gemfiles/rails-head.gemfile +3 -2
- data/lib/uri_format_validator/validators.rb +1 -1
- data/lib/uri_format_validator/validators/helper_methods.rb +1 -1
- data/lib/uri_format_validator/validators/{uri_format_validator.rb → uri_validator.rb} +4 -7
- data/lib/uri_format_validator/version.rb +1 -1
- data/uri_format_validator.gemspec +3 -0
- metadata +46 -4
- data/examples/basic.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 662386d8a9b9a39e5c43c3f01bad4de3d39a2996
|
4
|
+
data.tar.gz: f4db9c7be8335ca526eb57411a4c5e10161f8a59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99ca683995cbe4d3130607a545f773fff0783819664874b494f8fd5247ebb2d0f92ff972b516aa3be0f4b25568e49a570e6ccac9be7e7b6043d98b5f31a3da5f
|
7
|
+
data.tar.gz: c273205b76ba5eb0d64b0f4677b33527e24a1597e97f918ce14412f0965d4fb9d12f56a60637fee315b3f57a1dceee272194e297667f406eff1a8f896b94c66e
|
data/.codeclimate.yml
CHANGED
data/.editorconfig
CHANGED
data/.rubocop.yml
CHANGED
@@ -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
|
-
|
14
|
-
Description:
|
15
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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:
|
19
|
+
EnforcedStyle: indent
|
18
20
|
SupportedStyles:
|
19
|
-
-
|
20
|
-
-
|
21
|
-
|
22
|
-
Description:
|
23
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
26
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
-
-
|
43
|
-
-
|
44
|
-
|
45
|
-
Description:
|
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
|
-
|
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
|
-
-
|
50
|
-
-
|
51
|
-
|
52
|
-
|
53
|
-
|
55
|
+
- case
|
56
|
+
- end
|
57
|
+
IndentOneStep: false
|
58
|
+
Layout/CommentIndentation:
|
59
|
+
Description: Indentation of comments.
|
54
60
|
Enabled: true
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
-
-
|
80
|
-
-
|
81
|
-
|
82
|
-
Description:
|
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
|
-
|
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
|
-
-
|
98
|
-
-
|
99
|
-
|
100
|
-
Description:
|
101
|
-
|
102
|
-
|
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
|
-
-
|
106
|
-
-
|
107
|
-
|
108
|
-
|
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
|
-
|
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
|
-
-
|
126
|
-
-
|
127
|
-
|
128
|
-
Description:
|
129
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
130
|
-
Enabled:
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
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
|
-
-
|
139
|
-
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
Enabled:
|
144
|
-
|
145
|
-
|
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
|
-
-
|
148
|
-
-
|
149
|
-
|
150
|
-
Description:
|
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
|
-
|
154
|
-
|
155
|
-
|
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
|
-
|
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
|
-
|
161
|
-
|
162
|
-
|
163
|
-
Description:
|
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:
|
158
|
+
EnforcedStyle: indented
|
167
159
|
SupportedStyles:
|
168
|
-
-
|
169
|
-
-
|
170
|
-
|
171
|
-
Description:
|
172
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
182
|
-
|
183
|
-
|
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
|
-
|
200
|
-
|
201
|
-
|
202
|
-
-
|
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
|
-
|
208
|
-
|
209
|
-
-
|
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
|
-
|
226
|
-
|
227
|
-
|
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
|
-
|
237
|
-
|
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
|
-
|
267
|
-
|
268
|
-
-
|
269
|
-
-
|
270
|
-
|
271
|
-
Description: Checks
|
272
|
-
|
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:
|
195
|
+
EnforcedStyle: space
|
275
196
|
SupportedStyles:
|
276
|
-
-
|
277
|
-
-
|
278
|
-
|
279
|
-
Description: Use
|
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
|
-
|
288
|
-
|
289
|
-
-
|
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
|
-
|
296
|
-
|
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:
|
209
|
+
EnforcedStyle: space
|
329
210
|
SupportedStyles:
|
330
|
-
-
|
331
|
-
-
|
332
|
-
|
333
|
-
Description:
|
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
|
-
|
356
|
-
|
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
|
-
|
366
|
-
|
367
|
-
|
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
|
-
|
371
|
-
|
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
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
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
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
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
|
-
|
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/
|
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
|
-
|
414
|
-
Description:
|
415
|
-
Enabled:
|
416
|
-
|
417
|
-
|
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
|
-
|
426
|
-
|
427
|
-
Rails/HttpPositionalArguments:
|
312
|
+
Lint/ElseLayout:
|
313
|
+
Description: Check for odd code arrangement in an else block.
|
428
314
|
Enabled: false
|
429
|
-
|
430
|
-
Description: Checks for
|
315
|
+
Lint/EmptyEnsure:
|
316
|
+
Description: Checks for empty ensure block.
|
431
317
|
Enabled: true
|
432
|
-
|
433
|
-
|
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
|
-
|
441
|
-
|
442
|
-
Rails/ScopeArgs:
|
443
|
-
Description: Checks the arguments of ActiveRecord scopes.
|
321
|
+
Lint/EndAlignment:
|
322
|
+
Description: Align ends correctly.
|
444
323
|
Enabled: true
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
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
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
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
|
-
|
464
|
-
Description:
|
339
|
+
Lint/InvalidCharacterLiteral:
|
340
|
+
Description: Checks for invalid character literals with a non-escaped whitespace
|
341
|
+
character.
|
465
342
|
Enabled: false
|
466
|
-
|
467
|
-
Description:
|
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
|
-
|
471
|
-
Description:
|
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
|
-
|
475
|
-
Description: Use
|
476
|
-
|
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
|
-
|
479
|
-
Description:
|
480
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
483
|
-
Description:
|
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
|
-
|
487
|
-
Description: Avoid the
|
488
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-
|
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
|
-
|
491
|
-
Description: Do not use block
|
492
|
-
|
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
|
-
|
495
|
-
Description:
|
496
|
-
|
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
|
-
|
500
|
-
Description:
|
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
|
-
|
508
|
-
Description:
|
509
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
376
|
+
Lint/UnreachableCode:
|
377
|
+
Description: Unreachable code.
|
510
378
|
Enabled: true
|
511
|
-
|
512
|
-
Description:
|
513
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
516
|
-
Description:
|
517
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
528
|
-
Description:
|
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
|
-
|
532
|
-
Description:
|
533
|
-
|
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
|
-
|
545
|
-
Description:
|
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
|
-
|
553
|
-
Description:
|
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
|
-
|
569
|
-
Description:
|
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
|
-
|
581
|
-
Description:
|
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
|
-
|
585
|
-
Description:
|
586
|
-
|
406
|
+
Metrics/AbcSize:
|
407
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
408
|
+
conditions.
|
587
409
|
Enabled: true
|
588
|
-
|
589
|
-
|
590
|
-
|
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
|
-
|
593
|
-
|
594
|
-
|
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
|
-
|
601
|
-
|
602
|
-
|
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
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
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
|
-
|
613
|
-
Description:
|
614
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
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
|
-
|
621
|
-
Description:
|
622
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
623
|
-
Enabled:
|
624
|
-
|
625
|
-
Description:
|
626
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
627
|
-
Enabled:
|
628
|
-
|
629
|
-
Description: Use
|
630
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
633
|
-
|
634
|
-
|
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
|
-
|
637
|
-
|
638
|
-
|
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
|
-
|
641
|
-
|
642
|
-
|
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
|
-
|
645
|
-
|
646
|
-
|
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
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
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
|
-
|
654
|
-
Description:
|
655
|
-
|
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
|
-
|
658
|
-
Description: Checks for
|
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
|
-
|
662
|
-
|
663
|
-
|
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
|
-
|
666
|
-
|
537
|
+
Include:
|
538
|
+
- app/models/**/*.rb
|
539
|
+
Rails/ScopeArgs:
|
540
|
+
Description: Checks the arguments of ActiveRecord scopes.
|
667
541
|
Enabled: true
|
668
|
-
|
669
|
-
|
670
|
-
|
542
|
+
Include:
|
543
|
+
- app/models/**/*.rb
|
544
|
+
Rails/Validation:
|
545
|
+
Description: Use validates :attribute, hash of validations.
|
671
546
|
Enabled: true
|
672
|
-
|
673
|
-
|
674
|
-
|
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/
|
677
|
-
Description:
|
678
|
-
|
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/
|
686
|
-
Description:
|
687
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-
|
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:
|
560
|
+
EnforcedStyle: always
|
694
561
|
SupportedStyles:
|
695
|
-
-
|
696
|
-
-
|
697
|
-
|
698
|
-
Description:
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
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:
|
580
|
+
EnforcedStyle: bare_percent
|
721
581
|
SupportedStyles:
|
722
|
-
-
|
723
|
-
-
|
724
|
-
|
725
|
-
|
726
|
-
|
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
|
-
|
729
|
-
Description:
|
730
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
733
|
-
|
734
|
-
|
735
|
-
-
|
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
|
-
|
741
|
-
|
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:
|
600
|
+
EnforcedStyle: no_braces
|
745
601
|
SupportedStyles:
|
746
|
-
-
|
747
|
-
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
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
|
-
-
|
754
|
-
-
|
755
|
-
|
756
|
-
Description:
|
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:
|
623
|
+
EnforcedStyle: is_a?
|
759
624
|
SupportedStyles:
|
760
|
-
-
|
761
|
-
-
|
762
|
-
|
763
|
-
Description:
|
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
|
-
|
766
|
-
|
767
|
-
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
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
|
-
|
775
|
-
|
776
|
-
|
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
|
-
|
779
|
-
|
780
|
-
|
781
|
-
-
|
782
|
-
|
783
|
-
|
784
|
-
|
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
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
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
|
-
|
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
|
-
-
|
796
|
-
-
|
797
|
-
|
798
|
-
Description:
|
799
|
-
|
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
|
-
|
810
|
-
|
811
|
-
-
|
812
|
-
|
813
|
-
|
814
|
-
Description: Checks
|
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:
|
710
|
+
EnforcedStyle: each
|
817
711
|
SupportedStyles:
|
818
|
-
-
|
819
|
-
-
|
820
|
-
|
821
|
-
Description:
|
822
|
-
|
823
|
-
Enabled:
|
824
|
-
|
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
|
-
-
|
832
|
-
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
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:
|
840
|
-
EnforcedStyleForEmptyBraces: no_space
|
743
|
+
EnforcedStyle: ruby19
|
841
744
|
SupportedStyles:
|
842
|
-
-
|
843
|
-
-
|
844
|
-
|
845
|
-
Description:
|
846
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
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
|
-
-
|
851
|
-
-
|
852
|
-
|
853
|
-
Description:
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
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
|
-
|
939
|
-
Description:
|
940
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
943
|
-
|
944
|
-
|
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
|
-
|
947
|
-
Description:
|
948
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-
|
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
|
-
|
951
|
-
Description:
|
952
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
955
|
-
Description:
|
956
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-
|
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
|
-
|
959
|
-
|
960
|
-
|
961
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
964
|
-
Description:
|
965
|
-
|
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
|
-
|
968
|
-
|
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
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
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
|
-
|
976
|
-
Description:
|
977
|
-
|
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
|
-
|
982
|
-
Description:
|
983
|
-
|
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
|
-
|
988
|
-
Description: Checks
|
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
|
-
|
991
|
-
Description: Checks for
|
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
|
-
|
994
|
-
Description:
|
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
|
-
|
997
|
-
|
998
|
-
|
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
|
-
|
1001
|
-
Description:
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
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
|
-
|
1009
|
-
Description:
|
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
|
-
|
1012
|
-
Description:
|
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
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
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
|
-
|
1020
|
-
|
1021
|
-
|
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
|
-
|
1024
|
-
|
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
|
-
|
1027
|
-
Description:
|
1028
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
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
|
-
|
1031
|
-
|
1032
|
-
|
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
|
-
|
1035
|
-
|
1036
|
-
|
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
|
-
|
1039
|
-
Description:
|
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
|
-
|
1042
|
-
Description:
|
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
|
-
|
1053
|
-
|
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
|
-
|
1056
|
-
|
1057
|
-
|
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
|
-
|
1060
|
-
|
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
|
-
|
1063
|
-
Description: Checks for
|
1038
|
+
Style/UnneededCapitalW:
|
1039
|
+
Description: Checks for %W when interpolation is not needed.
|
1064
1040
|
Enabled: true
|
1065
|
-
|
1066
|
-
Description: Checks for
|
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
|
-
|
1069
|
-
Description:
|
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
|
-
|
1072
|
-
Description:
|
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
|
-
|
1075
|
-
Description:
|
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/
|