rusty_csv 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/rust_and_ruby.yml +37 -0
- data/.gitignore +14 -0
- data/.rubocop.yml +1031 -0
- data/.rustfmt.toml +24 -0
- data/CHANGELOG.md +0 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Cargo.toml +17 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +68 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +49 -0
- data/TODO.md +10 -0
- data/bin/check_linters +3 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/ext/Rakefile +10 -0
- data/lib/rusty_csv.rb +9 -0
- data/lib/rusty_csv/thermite_initialize.rb +24 -0
- data/lib/rusty_csv/version.rb +5 -0
- data/rusty_csv-0.1.0.gem +0 -0
- data/rusty_csv.gemspec +40 -0
- data/src/argument_hasher.rs +1 -0
- data/src/csv.rs +47 -0
- data/src/error/invalid_encoding.rs +0 -0
- data/src/error/malformed.rs +4 -0
- data/src/error/mod.rs +1 -0
- data/src/helper/debug_helper.rs +29 -0
- data/src/helper/mod.rs +2 -0
- data/src/helper/string_helper.rs +8 -0
- data/src/lib.rs +63 -0
- data/src/macros/mod.rs +0 -0
- metadata +191 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6c0548c36cd6bb20297f104d9e15b708467906f50de73f8267e00c9c21f3583c
|
4
|
+
data.tar.gz: 879f15e02df8ff24f31abb2c7c8dc393222bf81e879d3d25f7222a6b704567c9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a5ce4766c7212aaacbd45337aa81c6d1ae6bf896fdd8a27f5f17127629f0827cb570c683d3e7c8e63df7ccfbb0f2769d21a4be58ec1c4c10ac204d99d865c1ea
|
7
|
+
data.tar.gz: 3e33e0ed61005c9906b3b38fd95a8741d34537c345e48cb52bdf92efe66459905fb4a2ff6ff280b866072884257f37b8aaec7eff11b02abec5e3a10e9b609340
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Rust and Ruby check
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.6', '2.7', '3.0']
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
28
|
+
with:
|
29
|
+
ruby-version: ${{ matrix.ruby-version }}
|
30
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
31
|
+
- name: Run tests - Ruby
|
32
|
+
run: bundle exec rake test
|
33
|
+
|
34
|
+
- name: Build - Rust
|
35
|
+
run: cargo build --verbose
|
36
|
+
- name: Run tests - Rust
|
37
|
+
run: cargo test --verbose
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,1031 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- 'Gemfile'
|
4
|
+
- 'Rakefile'
|
5
|
+
- 'lib/**/*.rb'
|
6
|
+
- '*.gemspec'
|
7
|
+
Exclude:
|
8
|
+
- 'assets/**/*'
|
9
|
+
- 'benches/**/*'
|
10
|
+
- 'bin/**/*'
|
11
|
+
- 'doc/**/*'
|
12
|
+
- 'pkg/**/*'
|
13
|
+
- 'spec/**/*'
|
14
|
+
- 'src/**/*'
|
15
|
+
- 'target/**/*'
|
16
|
+
- 'test/support/bundler/helpers.rb'
|
17
|
+
- 'vendor/**/*'
|
18
|
+
DisabledByDefault: true
|
19
|
+
|
20
|
+
#################### Lint ################################
|
21
|
+
|
22
|
+
Lint/AmbiguousOperator:
|
23
|
+
Description: >-
|
24
|
+
Checks for ambiguous operators in the first argument of a
|
25
|
+
method invocation without parentheses.
|
26
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
27
|
+
Enabled: true
|
28
|
+
|
29
|
+
Lint/AmbiguousRegexpLiteral:
|
30
|
+
Description: >-
|
31
|
+
Checks for ambiguous regexp literals in the first argument of
|
32
|
+
a method invocation without parenthesis.
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
Lint/AssignmentInCondition:
|
36
|
+
Description: "Don't use assignment in conditions."
|
37
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
38
|
+
Enabled: true
|
39
|
+
|
40
|
+
Layout/BlockAlignment:
|
41
|
+
Description: 'Align block ends correctly.'
|
42
|
+
Enabled: true
|
43
|
+
|
44
|
+
Lint/CircularArgumentReference:
|
45
|
+
Description: "Don't refer to the keyword argument in the default value."
|
46
|
+
Enabled: true
|
47
|
+
|
48
|
+
Layout/ConditionPosition:
|
49
|
+
Description: >-
|
50
|
+
Checks for condition placed in a confusing position relative to
|
51
|
+
the keyword.
|
52
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
53
|
+
Enabled: true
|
54
|
+
|
55
|
+
Lint/Debugger:
|
56
|
+
Description: 'Check for debugger calls.'
|
57
|
+
Enabled: true
|
58
|
+
|
59
|
+
Layout/DefEndAlignment:
|
60
|
+
Description: 'Align ends corresponding to defs correctly.'
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Lint/DeprecatedClassMethods:
|
64
|
+
Description: 'Check for deprecated class method calls.'
|
65
|
+
Enabled: true
|
66
|
+
|
67
|
+
Lint/DuplicateMethods:
|
68
|
+
Description: 'Check for duplicate methods calls.'
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
Lint/EachWithObjectArgument:
|
72
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Lint/ElseLayout:
|
76
|
+
Description: 'Check for odd code arrangement in an else block.'
|
77
|
+
Enabled: true
|
78
|
+
|
79
|
+
Lint/EmptyEnsure:
|
80
|
+
Description: 'Checks for empty ensure block.'
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
Lint/EmptyInterpolation:
|
84
|
+
Description: 'Checks for empty string interpolation.'
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Layout/EndAlignment:
|
88
|
+
Description: 'Align ends correctly.'
|
89
|
+
Enabled: true
|
90
|
+
|
91
|
+
Style/EndBlock:
|
92
|
+
Description: 'END blocks should not be placed inside method definitions.'
|
93
|
+
Enabled: true
|
94
|
+
|
95
|
+
Lint/EnsureReturn:
|
96
|
+
Description: 'Do not use return in an ensure block.'
|
97
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
98
|
+
Enabled: true
|
99
|
+
|
100
|
+
Security/Eval:
|
101
|
+
Description: 'The use of eval represents a serious security risk.'
|
102
|
+
Enabled: true
|
103
|
+
|
104
|
+
Lint/FormatParameterMismatch:
|
105
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
106
|
+
Enabled: true
|
107
|
+
|
108
|
+
Lint/SuppressedException:
|
109
|
+
Description: "Don't suppress exception."
|
110
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
111
|
+
Enabled: true
|
112
|
+
|
113
|
+
Lint/LiteralInInterpolation:
|
114
|
+
Description: 'Checks for literals used in interpolation.'
|
115
|
+
Enabled: true
|
116
|
+
|
117
|
+
Lint/Loop:
|
118
|
+
Description: >-
|
119
|
+
Use Kernel#loop with break rather than begin/end/until or
|
120
|
+
begin/end/while for post-loop tests.
|
121
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
122
|
+
Enabled: true
|
123
|
+
|
124
|
+
Lint/NestedMethodDefinition:
|
125
|
+
Description: 'Do not use nested method definitions.'
|
126
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
127
|
+
Enabled: true
|
128
|
+
|
129
|
+
Lint/NonLocalExitFromIterator:
|
130
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
131
|
+
Enabled: true
|
132
|
+
|
133
|
+
Lint/ParenthesesAsGroupedExpression:
|
134
|
+
Description: >-
|
135
|
+
Checks for method calls with a space before the opening
|
136
|
+
parenthesis.
|
137
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
138
|
+
Enabled: true
|
139
|
+
|
140
|
+
Lint/RequireParentheses:
|
141
|
+
Description: >-
|
142
|
+
Use parentheses in the method call to avoid confusion
|
143
|
+
about precedence.
|
144
|
+
Enabled: true
|
145
|
+
|
146
|
+
Lint/RescueException:
|
147
|
+
Description: 'Avoid rescuing the Exception class.'
|
148
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
149
|
+
Enabled: true
|
150
|
+
|
151
|
+
Lint/ShadowingOuterLocalVariable:
|
152
|
+
Description: >-
|
153
|
+
Do not use the same name as outer local variable
|
154
|
+
for block arguments or block local variables.
|
155
|
+
Enabled: true
|
156
|
+
|
157
|
+
Lint/RedundantStringCoercion:
|
158
|
+
Description: 'Checks for Object#to_s usage in string interpolation.'
|
159
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
|
160
|
+
Enabled: true
|
161
|
+
|
162
|
+
Lint/UnderscorePrefixedVariableName:
|
163
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
164
|
+
Enabled: true
|
165
|
+
|
166
|
+
Lint/UnusedBlockArgument:
|
167
|
+
Description: 'Checks for unused block arguments.'
|
168
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
169
|
+
Enabled: true
|
170
|
+
|
171
|
+
Lint/UnusedMethodArgument:
|
172
|
+
Description: 'Checks for unused method arguments.'
|
173
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
174
|
+
Enabled: true
|
175
|
+
|
176
|
+
Lint/UnreachableCode:
|
177
|
+
Description: 'Unreachable code.'
|
178
|
+
Enabled: true
|
179
|
+
|
180
|
+
Lint/UselessAccessModifier:
|
181
|
+
Description: 'Checks for useless access modifiers.'
|
182
|
+
Enabled: true
|
183
|
+
|
184
|
+
Lint/UselessAssignment:
|
185
|
+
Description: 'Checks for useless assignment to a local variable.'
|
186
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
187
|
+
Enabled: true
|
188
|
+
|
189
|
+
Lint/UselessElseWithoutRescue:
|
190
|
+
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
191
|
+
Enabled: true
|
192
|
+
|
193
|
+
Lint/UselessSetterCall:
|
194
|
+
Description: 'Checks for useless setter call to a local variable.'
|
195
|
+
Enabled: true
|
196
|
+
|
197
|
+
Lint/Void:
|
198
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
199
|
+
Enabled: true
|
200
|
+
|
201
|
+
###################### Metrics ####################################
|
202
|
+
|
203
|
+
Metrics/AbcSize:
|
204
|
+
Description: >-
|
205
|
+
A calculated magnitude based on number of assignments,
|
206
|
+
branches, and conditions.
|
207
|
+
Reference: 'http://c2.com/cgi/wiki?AbcMetric'
|
208
|
+
Enabled: false
|
209
|
+
Max: 20
|
210
|
+
|
211
|
+
Metrics/BlockNesting:
|
212
|
+
Description: 'Avoid excessive block nesting'
|
213
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
214
|
+
Enabled: true
|
215
|
+
Max: 4
|
216
|
+
|
217
|
+
Metrics/ClassLength:
|
218
|
+
Description: 'Avoid classes longer than 250 lines of code.'
|
219
|
+
Enabled: true
|
220
|
+
Max: 250
|
221
|
+
|
222
|
+
Metrics/CyclomaticComplexity:
|
223
|
+
Description: >-
|
224
|
+
A complexity metric that is strongly correlated to the number
|
225
|
+
of test cases needed to validate a method.
|
226
|
+
Enabled: true
|
227
|
+
|
228
|
+
Layout/LineLength:
|
229
|
+
Max: 120
|
230
|
+
|
231
|
+
Metrics/MethodLength:
|
232
|
+
Description: 'Avoid methods longer than 30 lines of code.'
|
233
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
234
|
+
Enabled: true
|
235
|
+
Max: 30
|
236
|
+
|
237
|
+
Metrics/ModuleLength:
|
238
|
+
Description: 'Avoid modules longer than 250 lines of code.'
|
239
|
+
Enabled: true
|
240
|
+
Max: 250
|
241
|
+
|
242
|
+
Metrics/ParameterLists:
|
243
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
244
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
245
|
+
Enabled: true
|
246
|
+
|
247
|
+
Metrics/PerceivedComplexity:
|
248
|
+
Description: >-
|
249
|
+
A complexity metric geared towards measuring complexity for a
|
250
|
+
human reader.
|
251
|
+
Enabled: true
|
252
|
+
|
253
|
+
################## Style #################################
|
254
|
+
|
255
|
+
Layout/AccessModifierIndentation:
|
256
|
+
Description: Check indentation of private/protected visibility modifiers.
|
257
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
|
258
|
+
Enabled: true
|
259
|
+
|
260
|
+
Naming/AccessorMethodName:
|
261
|
+
Description: Check the naming of accessor methods for get_/set_.
|
262
|
+
Enabled: false
|
263
|
+
|
264
|
+
Style/Alias:
|
265
|
+
Description: 'Use alias_method instead of alias.'
|
266
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
267
|
+
Enabled: false
|
268
|
+
|
269
|
+
Layout/ArrayAlignment:
|
270
|
+
Description: >-
|
271
|
+
Align the elements of an array literal if they span more than
|
272
|
+
one line.
|
273
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
|
274
|
+
Enabled: true
|
275
|
+
|
276
|
+
Layout/HashAlignment:
|
277
|
+
Description: >-
|
278
|
+
Align the elements of a hash literal if they span more than
|
279
|
+
one line.
|
280
|
+
Enabled: true
|
281
|
+
|
282
|
+
Layout/ParameterAlignment:
|
283
|
+
Description: >-
|
284
|
+
Align the parameters of a method call if they span more
|
285
|
+
than one line. WRONG! Only indent 2 (don't use this).
|
286
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
|
287
|
+
Enabled: false
|
288
|
+
|
289
|
+
Style/AndOr:
|
290
|
+
Description: 'Use &&/|| instead of and/or.'
|
291
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
|
292
|
+
Enabled: false
|
293
|
+
|
294
|
+
Style/ArrayJoin:
|
295
|
+
Description: 'Use Array#join instead of Array#*.'
|
296
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
|
297
|
+
Enabled: true
|
298
|
+
|
299
|
+
Style/AsciiComments:
|
300
|
+
Description: 'Use only ascii symbols in comments.'
|
301
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
|
302
|
+
Enabled: false
|
303
|
+
|
304
|
+
Naming/AsciiIdentifiers:
|
305
|
+
Description: 'Use only ascii symbols in identifiers.'
|
306
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
307
|
+
Enabled: false
|
308
|
+
|
309
|
+
Style/Attr:
|
310
|
+
Description: 'Checks for uses of Module#attr.'
|
311
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
|
312
|
+
Enabled: true
|
313
|
+
|
314
|
+
Style/BeginBlock:
|
315
|
+
Description: 'Avoid the use of BEGIN blocks.'
|
316
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
|
317
|
+
Enabled: true
|
318
|
+
|
319
|
+
Style/BarePercentLiterals:
|
320
|
+
Description: 'Checks if usage of %() or %Q() matches configuration.'
|
321
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
|
322
|
+
Enabled: true
|
323
|
+
|
324
|
+
Style/BlockComments:
|
325
|
+
Description: 'Do not use block comments.'
|
326
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
|
327
|
+
Enabled: true
|
328
|
+
|
329
|
+
Layout/BlockEndNewline:
|
330
|
+
Description: 'Put end statement of multiline block on its own line.'
|
331
|
+
Enabled: true
|
332
|
+
|
333
|
+
Style/BlockDelimiters:
|
334
|
+
Description: >-
|
335
|
+
Avoid using {...} for multi-line blocks (multiline chaining is
|
336
|
+
always ugly).
|
337
|
+
Prefer {...} over do...end for single-line blocks.
|
338
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
339
|
+
Enabled: true
|
340
|
+
|
341
|
+
Style/CaseEquality:
|
342
|
+
Description: 'Avoid explicit use of the case equality operator(===).'
|
343
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
|
344
|
+
Enabled: false
|
345
|
+
|
346
|
+
Layout/CaseIndentation:
|
347
|
+
Description: 'Indentation of when in a case/when/[else/]end.'
|
348
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
|
349
|
+
Enabled: true
|
350
|
+
|
351
|
+
Style/CharacterLiteral:
|
352
|
+
Description: 'Checks for uses of character literals.'
|
353
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
|
354
|
+
Enabled: true
|
355
|
+
|
356
|
+
Naming/ClassAndModuleCamelCase:
|
357
|
+
Description: 'Use CamelCase for classes and modules.'
|
358
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
|
359
|
+
Enabled: true
|
360
|
+
|
361
|
+
Style/ClassAndModuleChildren:
|
362
|
+
Description: 'Checks style of children classes and modules. This detests usage of ::'
|
363
|
+
Enabled: false
|
364
|
+
|
365
|
+
Style/ClassCheck:
|
366
|
+
Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
|
367
|
+
Enabled: true
|
368
|
+
|
369
|
+
Style/ClassMethods:
|
370
|
+
Description: 'Use self when defining module/class methods.'
|
371
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
|
372
|
+
Enabled: true
|
373
|
+
|
374
|
+
Style/ClassVars:
|
375
|
+
Description: 'Avoid the use of class variables.'
|
376
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
|
377
|
+
Enabled: true
|
378
|
+
|
379
|
+
Layout/ClosingParenthesisIndentation:
|
380
|
+
Description: 'Checks the indentation of hanging closing parentheses. Faulty!'
|
381
|
+
Enabled: false
|
382
|
+
|
383
|
+
Style/ColonMethodCall:
|
384
|
+
Description: 'Do not use :: for method call.'
|
385
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
|
386
|
+
Enabled: true
|
387
|
+
|
388
|
+
Style/CommandLiteral:
|
389
|
+
Description: 'Use `` or %x around command literals.'
|
390
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
|
391
|
+
Enabled: true
|
392
|
+
|
393
|
+
Style/CommentAnnotation:
|
394
|
+
Description: 'Checks formatting of annotation comments.'
|
395
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
|
396
|
+
Enabled: false
|
397
|
+
|
398
|
+
Layout/CommentIndentation:
|
399
|
+
Description: 'Indentation of comments.'
|
400
|
+
Enabled: false
|
401
|
+
|
402
|
+
Naming/ConstantName:
|
403
|
+
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
404
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
|
405
|
+
Enabled: false
|
406
|
+
|
407
|
+
Style/DefWithParentheses:
|
408
|
+
Description: 'Use def with parentheses when there are arguments.'
|
409
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
410
|
+
Enabled: false
|
411
|
+
|
412
|
+
Style/PreferredHashMethods:
|
413
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
414
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
415
|
+
Enabled: true
|
416
|
+
|
417
|
+
Style/Documentation:
|
418
|
+
Description: 'Document classes and non-namespace modules.'
|
419
|
+
Enabled: false
|
420
|
+
|
421
|
+
Layout/DotPosition:
|
422
|
+
Description: 'Checks the position of the dot in multi-line method calls. WRONG CHOICE! NEED OPTION B!'
|
423
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
424
|
+
Enabled: false
|
425
|
+
|
426
|
+
Style/DoubleNegation:
|
427
|
+
Description: 'Checks for uses of double negation (!!).'
|
428
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
429
|
+
Enabled: false
|
430
|
+
|
431
|
+
Style/EachWithObject:
|
432
|
+
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
433
|
+
Enabled: false
|
434
|
+
|
435
|
+
Layout/ElseAlignment:
|
436
|
+
Description: 'Align elses and elsifs correctly.'
|
437
|
+
Enabled: true
|
438
|
+
|
439
|
+
Style/EmptyElse:
|
440
|
+
Description: 'Avoid empty else-clauses.'
|
441
|
+
Enabled: true
|
442
|
+
|
443
|
+
Layout/EmptyLineBetweenDefs:
|
444
|
+
Description: 'Use empty lines between defs.'
|
445
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
|
446
|
+
Enabled: false
|
447
|
+
|
448
|
+
Layout/EmptyLines:
|
449
|
+
Description: "Don't use several empty lines in a row."
|
450
|
+
Enabled: true
|
451
|
+
|
452
|
+
Layout/EmptyLinesAroundAccessModifier:
|
453
|
+
Description: "Keep blank lines around access modifiers. (eg: private)"
|
454
|
+
Enabled: false
|
455
|
+
|
456
|
+
Layout/EmptyLinesAroundBlockBody:
|
457
|
+
Description: "Keeps track of empty lines around block bodies."
|
458
|
+
Enabled: false
|
459
|
+
|
460
|
+
Layout/EmptyLinesAroundClassBody:
|
461
|
+
Description: "Keeps track of empty lines around class bodies."
|
462
|
+
Enabled: false
|
463
|
+
|
464
|
+
Layout/EmptyLinesAroundModuleBody:
|
465
|
+
Description: "Keeps track of empty lines around module bodies."
|
466
|
+
Enabled: false
|
467
|
+
|
468
|
+
Layout/EmptyLinesAroundMethodBody:
|
469
|
+
Description: "Keeps track of empty lines around method bodies."
|
470
|
+
Enabled: false
|
471
|
+
|
472
|
+
Style/EmptyLiteral:
|
473
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
474
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
|
475
|
+
Enabled: false
|
476
|
+
|
477
|
+
Layout/EndOfLine:
|
478
|
+
Description: 'Use Unix-style line endings.'
|
479
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
|
480
|
+
Enabled: false
|
481
|
+
|
482
|
+
Style/EvenOdd:
|
483
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
484
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
485
|
+
Enabled: false
|
486
|
+
|
487
|
+
Layout/ExtraSpacing:
|
488
|
+
Description: 'Do not use unnecessary spacing.'
|
489
|
+
Enabled: true
|
490
|
+
|
491
|
+
Naming/FileName:
|
492
|
+
Description: 'Use snake_case for source file names.'
|
493
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
494
|
+
Enabled: false
|
495
|
+
|
496
|
+
Layout/InitialIndentation:
|
497
|
+
Description: >-
|
498
|
+
Checks the indentation of the first non-blank non-comment line in a file.
|
499
|
+
Enabled: true
|
500
|
+
|
501
|
+
Layout/FirstParameterIndentation:
|
502
|
+
Description: 'Checks the indentation of the first parameter in a method call.'
|
503
|
+
Enabled: false
|
504
|
+
|
505
|
+
Lint/FlipFlop:
|
506
|
+
Description: 'Checks for flip flops'
|
507
|
+
StyleGuide: 'https://blog.newrelic.com/2015/02/24/weird-ruby-part-3-fun-flip-flop-phenom/'
|
508
|
+
Enabled: true
|
509
|
+
|
510
|
+
Style/For:
|
511
|
+
Description: 'Checks use of for or each in multiline loops.'
|
512
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
|
513
|
+
Enabled: true
|
514
|
+
|
515
|
+
Style/FormatString:
|
516
|
+
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
517
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
|
518
|
+
Enabled: false
|
519
|
+
|
520
|
+
Style/GlobalVars:
|
521
|
+
Description: 'Do not introduce global variables.'
|
522
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
523
|
+
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
524
|
+
Enabled: true
|
525
|
+
|
526
|
+
Style/GuardClause:
|
527
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
528
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
529
|
+
Enabled: false
|
530
|
+
|
531
|
+
Style/HashSyntax:
|
532
|
+
Description: >-
|
533
|
+
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
534
|
+
{ :a => 1, :b => 2 }.
|
535
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
|
536
|
+
Enabled: true
|
537
|
+
|
538
|
+
Style/IfUnlessModifier:
|
539
|
+
Description: >-
|
540
|
+
Favor modifier if/unless usage when you have a
|
541
|
+
single-line body.
|
542
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
543
|
+
Enabled: false
|
544
|
+
|
545
|
+
Style/IfWithSemicolon:
|
546
|
+
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
547
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
548
|
+
Enabled: true
|
549
|
+
|
550
|
+
Layout/IndentationConsistency:
|
551
|
+
Description: 'Keep indentation straight.'
|
552
|
+
Enabled: true
|
553
|
+
|
554
|
+
Layout/IndentationWidth:
|
555
|
+
Description: 'Use 2 spaces for indentation.'
|
556
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
557
|
+
Enabled: true
|
558
|
+
|
559
|
+
Layout/FirstArrayElementIndentation:
|
560
|
+
Description: >-
|
561
|
+
Checks the indentation of the first element in an array
|
562
|
+
literal.
|
563
|
+
Enabled: false
|
564
|
+
|
565
|
+
Layout/FirstHashElementIndentation:
|
566
|
+
Description: 'Checks the indentation of the first key in a hash literal.'
|
567
|
+
Enabled: false
|
568
|
+
|
569
|
+
Style/InfiniteLoop:
|
570
|
+
Description: 'Use Kernel#loop for infinite loops.'
|
571
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
|
572
|
+
Enabled: true
|
573
|
+
|
574
|
+
Style/Lambda:
|
575
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
576
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
577
|
+
Enabled: true
|
578
|
+
|
579
|
+
Style/LambdaCall:
|
580
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
581
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
582
|
+
Enabled: false
|
583
|
+
|
584
|
+
Layout/LeadingCommentSpace:
|
585
|
+
Description: 'Comments should start with a space.'
|
586
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
587
|
+
Enabled: true
|
588
|
+
|
589
|
+
Style/LineEndConcatenation:
|
590
|
+
Description: >-
|
591
|
+
Use \ instead of + or << to concatenate two string literals at
|
592
|
+
line end.
|
593
|
+
Enabled: true
|
594
|
+
|
595
|
+
Style/MethodCallWithoutArgsParentheses:
|
596
|
+
Description: 'Do not use parentheses for method calls with no arguments.'
|
597
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
|
598
|
+
Enabled: false
|
599
|
+
|
600
|
+
Style/MethodDefParentheses:
|
601
|
+
Description: >-
|
602
|
+
Checks if the method definitions have or don't have
|
603
|
+
parentheses.
|
604
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
605
|
+
Enabled: false
|
606
|
+
|
607
|
+
Naming/MethodName:
|
608
|
+
Description: 'Use the configured style when naming methods.'
|
609
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
610
|
+
Enabled: true
|
611
|
+
|
612
|
+
Style/ModuleFunction:
|
613
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
614
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
615
|
+
Enabled: true
|
616
|
+
|
617
|
+
Style/MultilineBlockChain:
|
618
|
+
Description: 'Avoid multi-line chains of blocks.'
|
619
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
620
|
+
Enabled: true
|
621
|
+
|
622
|
+
Layout/MultilineBlockLayout:
|
623
|
+
Description: 'Ensures newlines after multiline block do statements.'
|
624
|
+
Enabled: false
|
625
|
+
|
626
|
+
Style/MultilineIfThen:
|
627
|
+
Description: 'Do not use then for multi-line if/unless.'
|
628
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
|
629
|
+
Enabled: true
|
630
|
+
|
631
|
+
Layout/MultilineOperationIndentation:
|
632
|
+
Description: >-
|
633
|
+
Checks indentation of binary operations that span more than
|
634
|
+
one line.
|
635
|
+
Enabled: false
|
636
|
+
|
637
|
+
Style/MultilineTernaryOperator:
|
638
|
+
Description: >-
|
639
|
+
Avoid multi-line ?: (the ternary operator);
|
640
|
+
use if/unless instead.
|
641
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
|
642
|
+
Enabled: true
|
643
|
+
|
644
|
+
Style/NegatedIf:
|
645
|
+
Description: >-
|
646
|
+
Favor unless over if for negative conditions
|
647
|
+
(or control flow or).
|
648
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
649
|
+
Enabled: false
|
650
|
+
|
651
|
+
Style/NegatedWhile:
|
652
|
+
Description: 'Favor until over while for negative conditions.'
|
653
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
654
|
+
Enabled: false
|
655
|
+
|
656
|
+
Style/NestedTernaryOperator:
|
657
|
+
Description: 'Use one expression per branch in a ternary operator.'
|
658
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
|
659
|
+
Enabled: true
|
660
|
+
|
661
|
+
Style/Next:
|
662
|
+
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
663
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
664
|
+
Enabled: true
|
665
|
+
|
666
|
+
Style/NilComparison:
|
667
|
+
Description: 'Prefer x.nil? to x == nil.'
|
668
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
669
|
+
Enabled: true
|
670
|
+
|
671
|
+
Style/NonNilCheck:
|
672
|
+
Description: 'Checks for redundant nil checks.'
|
673
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
|
674
|
+
Enabled: true
|
675
|
+
|
676
|
+
Style/Not:
|
677
|
+
Description: 'Use ! instead of not.'
|
678
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
|
679
|
+
Enabled: false
|
680
|
+
|
681
|
+
Style/NumericLiterals:
|
682
|
+
Description: >-
|
683
|
+
Add underscores to large numeric literals to improve their
|
684
|
+
readability.
|
685
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
686
|
+
Enabled: true
|
687
|
+
|
688
|
+
Style/OneLineConditional:
|
689
|
+
Description: >-
|
690
|
+
Favor the ternary operator(?:) over
|
691
|
+
if/then/else/end constructs.
|
692
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
693
|
+
Enabled: true
|
694
|
+
|
695
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
696
|
+
Description: 'When defining binary operators, name the argument other.'
|
697
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
698
|
+
Enabled: true
|
699
|
+
|
700
|
+
Style/OptionalArguments:
|
701
|
+
Description: >-
|
702
|
+
Checks for optional arguments that do not appear at the end
|
703
|
+
of the argument list
|
704
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
|
705
|
+
Enabled: true
|
706
|
+
|
707
|
+
Style/ParallelAssignment:
|
708
|
+
Description: >-
|
709
|
+
Check for simple usages of parallel assignment.
|
710
|
+
It will only warn when the number of variables
|
711
|
+
matches on both sides of the assignment.
|
712
|
+
This also provides performance benefits
|
713
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
|
714
|
+
Enabled: true
|
715
|
+
|
716
|
+
Style/ParenthesesAroundCondition:
|
717
|
+
Description: >-
|
718
|
+
Don't use parentheses around the condition of an
|
719
|
+
if/unless/while.
|
720
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
|
721
|
+
Enabled: true
|
722
|
+
|
723
|
+
Style/PercentLiteralDelimiters:
|
724
|
+
Description: 'Use `%`-literal delimiters consistently'
|
725
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
|
726
|
+
Enabled: true
|
727
|
+
|
728
|
+
Style/PercentQLiterals:
|
729
|
+
Description: 'Checks if uses of %Q/%q match the configured preference.'
|
730
|
+
Enabled: true
|
731
|
+
|
732
|
+
Style/PerlBackrefs:
|
733
|
+
Description: 'Avoid Perl-style regex back references.'
|
734
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
|
735
|
+
Enabled: true
|
736
|
+
|
737
|
+
Naming/PredicateName:
|
738
|
+
Description: 'Check the names of predicate methods.'
|
739
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
740
|
+
Enabled: false
|
741
|
+
|
742
|
+
Style/Proc:
|
743
|
+
Description: 'Use proc instead of Proc.new.'
|
744
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
|
745
|
+
Enabled: false
|
746
|
+
|
747
|
+
Style/RaiseArgs:
|
748
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
749
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
|
750
|
+
Enabled: true
|
751
|
+
|
752
|
+
Style/RedundantBegin:
|
753
|
+
Description: "Don't use begin blocks when they are not needed."
|
754
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
|
755
|
+
Enabled: true
|
756
|
+
|
757
|
+
Style/RedundantException:
|
758
|
+
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
759
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
|
760
|
+
Enabled: true
|
761
|
+
|
762
|
+
Style/RedundantReturn:
|
763
|
+
Description: "Don't use return where it's not required."
|
764
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
|
765
|
+
Enabled: true
|
766
|
+
|
767
|
+
Style/RedundantSelf:
|
768
|
+
Description: "Don't use self where it's not needed."
|
769
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
|
770
|
+
Enabled: true
|
771
|
+
|
772
|
+
Style/RegexpLiteral:
|
773
|
+
Description: 'Use / or %r around regular expressions.'
|
774
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
|
775
|
+
Enabled: true
|
776
|
+
|
777
|
+
Layout/RescueEnsureAlignment:
|
778
|
+
Description: 'Align rescues and ensures correctly.'
|
779
|
+
Enabled: true
|
780
|
+
|
781
|
+
Style/RescueModifier:
|
782
|
+
Description: 'Avoid using rescue in its modifier form.'
|
783
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
|
784
|
+
Enabled: true
|
785
|
+
|
786
|
+
Style/SelfAssignment:
|
787
|
+
Description: >-
|
788
|
+
Checks for places where self-assignment shorthand should have
|
789
|
+
been used.
|
790
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
791
|
+
Enabled: false
|
792
|
+
|
793
|
+
Style/Semicolon:
|
794
|
+
Description: "Don't use semicolons to terminate expressions."
|
795
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
|
796
|
+
Enabled: false
|
797
|
+
|
798
|
+
Style/SignalException:
|
799
|
+
Description: 'Checks for proper usage of fail and raise.'
|
800
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
801
|
+
Enabled: true
|
802
|
+
|
803
|
+
Style/SingleLineBlockParams:
|
804
|
+
Description: 'Enforces the names of some block params.'
|
805
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
|
806
|
+
Enabled: false
|
807
|
+
|
808
|
+
Style/SingleLineMethods:
|
809
|
+
Description: 'Avoid single-line methods.'
|
810
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
|
811
|
+
Enabled: false
|
812
|
+
|
813
|
+
Layout/SpaceBeforeFirstArg:
|
814
|
+
Description: >-
|
815
|
+
Checks that exactly one space is used between a method name
|
816
|
+
and the first argument for method calls without parentheses.
|
817
|
+
Enabled: true
|
818
|
+
|
819
|
+
Layout/SpaceAfterColon:
|
820
|
+
Description: 'Use spaces after colons.'
|
821
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
822
|
+
Enabled: true
|
823
|
+
|
824
|
+
Layout/SpaceAfterComma:
|
825
|
+
Description: 'Use spaces after commas.'
|
826
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
827
|
+
Enabled: true
|
828
|
+
|
829
|
+
Layout/SpaceAroundKeyword:
|
830
|
+
Description: 'Use spaces around keywords.'
|
831
|
+
Enabled: true
|
832
|
+
|
833
|
+
Layout/SpaceAfterMethodName:
|
834
|
+
Description: >-
|
835
|
+
Do not put a space between a method name and the opening
|
836
|
+
parenthesis in a method definition.
|
837
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
838
|
+
Enabled: true
|
839
|
+
|
840
|
+
Layout/SpaceAfterNot:
|
841
|
+
Description: Tracks redundant space after the ! operator.
|
842
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
|
843
|
+
Enabled: true
|
844
|
+
|
845
|
+
Layout/SpaceAfterSemicolon:
|
846
|
+
Description: 'Use spaces after semicolons.'
|
847
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
848
|
+
Enabled: true
|
849
|
+
|
850
|
+
Layout/SpaceBeforeBlockBraces:
|
851
|
+
Description: >-
|
852
|
+
Checks that the left block brace has or doesn't have space
|
853
|
+
before it.
|
854
|
+
Enabled: false
|
855
|
+
|
856
|
+
Layout/SpaceBeforeComma:
|
857
|
+
Description: 'No spaces before commas.'
|
858
|
+
Enabled: true
|
859
|
+
|
860
|
+
Layout/SpaceBeforeComment:
|
861
|
+
Description: >-
|
862
|
+
Checks for missing space between code and a comment on the
|
863
|
+
same line.
|
864
|
+
Enabled: true
|
865
|
+
|
866
|
+
Layout/SpaceBeforeSemicolon:
|
867
|
+
Description: 'No spaces before semicolons.'
|
868
|
+
Enabled: true
|
869
|
+
|
870
|
+
Layout/SpaceInsideBlockBraces:
|
871
|
+
Description: >-
|
872
|
+
Checks that block braces have or don't have surrounding space.
|
873
|
+
For blocks taking parameters, checks that the left brace has
|
874
|
+
or doesn't have trailing space.
|
875
|
+
Enabled: false
|
876
|
+
|
877
|
+
Layout/SpaceAroundBlockParameters:
|
878
|
+
Description: 'Checks the spacing inside and after block parameters pipes.'
|
879
|
+
Enabled: true
|
880
|
+
|
881
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
882
|
+
Description: >-
|
883
|
+
Checks that the equals signs in parameter default assignments
|
884
|
+
have or don't have surrounding space depending on
|
885
|
+
configuration.
|
886
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
|
887
|
+
Enabled: false
|
888
|
+
|
889
|
+
Layout/SpaceAroundOperators:
|
890
|
+
Description: 'Use a single space around operators.'
|
891
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
892
|
+
Enabled: false
|
893
|
+
|
894
|
+
Layout/SpaceInsideHashLiteralBraces:
|
895
|
+
Description: "Use spaces inside hash literal braces - or don't."
|
896
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
897
|
+
Enabled: false
|
898
|
+
|
899
|
+
Layout/SpaceInsideParens:
|
900
|
+
Description: 'No spaces after ( or before ).'
|
901
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
902
|
+
Enabled: false
|
903
|
+
|
904
|
+
Layout/SpaceInsideRangeLiteral:
|
905
|
+
Description: 'No spaces inside range literals.'
|
906
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
|
907
|
+
Enabled: false
|
908
|
+
|
909
|
+
Layout/SpaceInsideStringInterpolation:
|
910
|
+
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
911
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
|
912
|
+
Enabled: false
|
913
|
+
|
914
|
+
Style/SpecialGlobalVars:
|
915
|
+
Description: 'Avoid Perl-style global variables.'
|
916
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
|
917
|
+
Enabled: true
|
918
|
+
|
919
|
+
Style/StringLiterals:
|
920
|
+
Enabled: true
|
921
|
+
EnforcedStyle: single_quotes
|
922
|
+
|
923
|
+
Style/StringLiteralsInInterpolation:
|
924
|
+
Description: >-
|
925
|
+
Checks if uses of quotes inside expressions in interpolated
|
926
|
+
strings match the configured preference.
|
927
|
+
Enabled: false
|
928
|
+
|
929
|
+
Style/StructInheritance:
|
930
|
+
Description: 'Checks for inheritance from Struct.new.'
|
931
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
|
932
|
+
Enabled: true
|
933
|
+
|
934
|
+
Style/SymbolLiteral:
|
935
|
+
Description: 'Use plain symbols instead of string symbols when possible.'
|
936
|
+
Enabled: true
|
937
|
+
|
938
|
+
Style/SymbolProc:
|
939
|
+
Description: 'Use symbols as procs instead of blocks when possible.'
|
940
|
+
Enabled: false
|
941
|
+
|
942
|
+
Layout/IndentationStyle:
|
943
|
+
Description: 'No hard tabs.'
|
944
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
945
|
+
Enabled: true
|
946
|
+
|
947
|
+
Layout/TrailingEmptyLines:
|
948
|
+
Description: 'Checks trailing blank lines and final newline.'
|
949
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
|
950
|
+
Enabled: true
|
951
|
+
|
952
|
+
Style/TrailingCommaInArguments:
|
953
|
+
Description: 'Checks for trailing comma in parameter lists.'
|
954
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
|
955
|
+
Enabled: false
|
956
|
+
|
957
|
+
Style/TrailingCommaInArrayLiteral:
|
958
|
+
Description: 'Checks for trailing comma in literals.'
|
959
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
960
|
+
Enabled: false
|
961
|
+
|
962
|
+
Style/TrailingCommaInHashLiteral:
|
963
|
+
Description: 'Checks for trailing comma in literals.'
|
964
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
965
|
+
Enabled: false
|
966
|
+
|
967
|
+
Layout/TrailingWhitespace:
|
968
|
+
Description: 'Avoid trailing whitespace.'
|
969
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
|
970
|
+
Enabled: true
|
971
|
+
|
972
|
+
Style/TrivialAccessors:
|
973
|
+
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
974
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
|
975
|
+
Enabled: false
|
976
|
+
|
977
|
+
Style/UnlessElse:
|
978
|
+
Description: >-
|
979
|
+
Do not use unless with else. Rewrite these with the positive
|
980
|
+
case first.
|
981
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
|
982
|
+
Enabled: true
|
983
|
+
|
984
|
+
Style/RedundantCapitalW:
|
985
|
+
Description: 'Checks for %W when interpolation is not needed.'
|
986
|
+
Enabled: true
|
987
|
+
|
988
|
+
Style/RedundantPercentQ:
|
989
|
+
Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
|
990
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
|
991
|
+
Enabled: true
|
992
|
+
|
993
|
+
Style/TrailingUnderscoreVariable:
|
994
|
+
Description: >-
|
995
|
+
Checks for the usage of unneeded trailing underscores at the
|
996
|
+
end of parallel variable assignment.
|
997
|
+
Enabled: false
|
998
|
+
|
999
|
+
Style/VariableInterpolation:
|
1000
|
+
Description: >-
|
1001
|
+
Don't interpolate global, instance and class variables
|
1002
|
+
directly in strings.
|
1003
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
1004
|
+
Enabled: true
|
1005
|
+
|
1006
|
+
Naming/VariableName:
|
1007
|
+
Description: 'Use the configured style when naming variables.'
|
1008
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
1009
|
+
Enabled: true
|
1010
|
+
|
1011
|
+
Style/WhenThen:
|
1012
|
+
Description: 'Use when x then ... for one-line cases.'
|
1013
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
|
1014
|
+
Enabled: true
|
1015
|
+
|
1016
|
+
Style/WhileUntilDo:
|
1017
|
+
Description: 'Checks for redundant do after while or until.'
|
1018
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
|
1019
|
+
Enabled: true
|
1020
|
+
|
1021
|
+
Style/WhileUntilModifier:
|
1022
|
+
Description: >-
|
1023
|
+
Favor modifier while/until usage when you have a
|
1024
|
+
single-line body.
|
1025
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
1026
|
+
Enabled: true
|
1027
|
+
|
1028
|
+
Style/WordArray:
|
1029
|
+
Description: 'Use %w or %W for arrays of words.'
|
1030
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
|
1031
|
+
Enabled: false
|