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