arcadia_cops 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arcadia_cops/config.yml +71 -0
- data/lib/arcadia_cops/enabled.yml +488 -0
- data/lib/arcadia_cops/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bd311576a85df26bc0ec95d52dd6ecd5fe2b2b0
|
4
|
+
data.tar.gz: af60523f56d95bdf670c5102f8b88fb8205fee2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0be0177915bf5626d5e00145f9a698dbfccb1de3ce6254748653c99210319fa502431f51dbd8798921e6793cfb8f025288bd15ed8979c48e4cbe32ba4349ec85
|
7
|
+
data.tar.gz: dd95d5e221b623795d7ce838526252452f186c72b9b188f9df3c291540fcde885ed5980f57af928f9e0b337afdc634ea080b033ad5f1263d4e5fe0a75ccfe177
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# This is the default configuration file. Enabling and disabling is configured
|
2
|
+
# in separate files. This file adds all other parameters apart from Enabled.
|
3
|
+
|
4
|
+
# Common configuration.
|
5
|
+
AllCops:
|
6
|
+
# Include common Ruby source files.
|
7
|
+
Include:
|
8
|
+
- '**/*.gemspec'
|
9
|
+
- '**/*.rake'
|
10
|
+
- '**/config.ru'
|
11
|
+
- '**/Gemfile'
|
12
|
+
- '**/Rakefile'
|
13
|
+
- '**/Guardfile'
|
14
|
+
Exclude:
|
15
|
+
- 'vendor/**/*'
|
16
|
+
# Default formatter will be used if no -f/--format option is given.
|
17
|
+
DefaultFormatter: progress
|
18
|
+
# Cop names are not displayed in offense messages by default. Change behavior
|
19
|
+
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
|
20
|
+
# option.
|
21
|
+
DisplayCopNames: true
|
22
|
+
# Style guide URLs are not displayed in offense messages by default. Change
|
23
|
+
# behavior by overriding DisplayStyleGuide, or by giving the
|
24
|
+
# -S/--display-style-guide option.
|
25
|
+
DisplayStyleGuide: true
|
26
|
+
# When specifying style guide URLs, any paths and/or fragments will be
|
27
|
+
# evaluated relative to the base URL.
|
28
|
+
StyleGuideBaseURL: https://github.com/bbatsov/ruby-style-guide
|
29
|
+
# Extra details are not displayed in offense messages by default. Change
|
30
|
+
# behavior by overriding ExtraDetails, or by giving the
|
31
|
+
# -E/--extra-details option.
|
32
|
+
ExtraDetails: true
|
33
|
+
# Additional cops that do not reference a style guide rule may be enabled by
|
34
|
+
# default. Change behavior by overriding StyleGuideCopsOnly, or by giving
|
35
|
+
# the --only-guide-cops option.
|
36
|
+
StyleGuideCopsOnly: false
|
37
|
+
# All cops except the ones in disabled.yml are enabled by default. Change
|
38
|
+
# this behavior by overriding DisabledByDefault. When DisabledByDefault is
|
39
|
+
# true, all cops in the default configuration are disabled, and and only cops
|
40
|
+
# in user configuration are enabled. This makes cops opt-in instead of
|
41
|
+
# opt-out. Note that when DisabledByDefault is true, cops in user
|
42
|
+
# configuration will be enabled even if they don't set the Enabled parameter.
|
43
|
+
DisabledByDefault: true
|
44
|
+
# Enables the result cache if true. Can be overridden by the --cache command
|
45
|
+
# line option.
|
46
|
+
UseCache: true
|
47
|
+
# Threshold for how many files can be stored in the result cache before some
|
48
|
+
# of the files are automatically removed.
|
49
|
+
MaxFilesInCache: 20000
|
50
|
+
# The cache will be stored in "rubocop_cache" under this directory. The name
|
51
|
+
# "/tmp" is special and will be converted to the system temporary directory,
|
52
|
+
# which is "/tmp" on Unix-like systems, but could be something else on other
|
53
|
+
# systems.
|
54
|
+
CacheRootDirectory: ~
|
55
|
+
# The default cache root directory is /tmp, which on most systems is
|
56
|
+
# writable by any system user. This means that it is possible for a
|
57
|
+
# malicious user to anticipate the location of Rubocop's cache directory,
|
58
|
+
# and create a symlink in its place that could cause Rubocop to overwrite
|
59
|
+
# unintended files, or read malicious input. If you are certain that your
|
60
|
+
# cache location is secure from this kind of attack, and wish to use a
|
61
|
+
# symlinked cache location, set this value to "true".
|
62
|
+
AllowSymlinksInCacheRootDirectory: false
|
63
|
+
# What MRI version of the Ruby interpreter is the inspected code intended to
|
64
|
+
# run on? (If there is more than one, set this to the lowest version.)
|
65
|
+
# If a value is specified for TargetRubyVersion then it is used.
|
66
|
+
# Else if .ruby-version exists and it contains an MRI version it is used.
|
67
|
+
# Otherwise we fallback to the oldest officially supported Ruby version (2.1).
|
68
|
+
TargetRubyVersion: 2.3
|
69
|
+
|
70
|
+
Rails:
|
71
|
+
Enabled: false
|
@@ -0,0 +1,488 @@
|
|
1
|
+
# Enabled cops
|
2
|
+
|
3
|
+
######### STYLE #########
|
4
|
+
|
5
|
+
Layout/AccessModifierIndentation:
|
6
|
+
Description: Check indentation of private/protected visibility modifiers.
|
7
|
+
StyleGuide: '#indent-public-private-protected'
|
8
|
+
|
9
|
+
Layout/AlignArray:
|
10
|
+
Description: >-
|
11
|
+
Align the elements of an array literal if they span more than
|
12
|
+
one line.
|
13
|
+
StyleGuide: '#align-multiline-arrays'
|
14
|
+
|
15
|
+
Layout/AlignHash:
|
16
|
+
Description: >-
|
17
|
+
Align the elements of a hash literal if they span more than
|
18
|
+
one line.
|
19
|
+
|
20
|
+
Layout/BlockEndNewline:
|
21
|
+
Description: 'Put end statement of multiline block on its own line.'
|
22
|
+
|
23
|
+
Style/CommentAnnotation:
|
24
|
+
Description: >-
|
25
|
+
Checks formatting of special comments
|
26
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
27
|
+
StyleGuide: '#annotate-keywords'
|
28
|
+
|
29
|
+
Style/ClassAndModuleCamelCase:
|
30
|
+
Description: 'Use CamelCase for classes and modules.'
|
31
|
+
StyleGuide: '#camelcase-classes'
|
32
|
+
|
33
|
+
Style/ClassAndModuleChildren:
|
34
|
+
Description: 'Checks style of children classes and modules.'
|
35
|
+
|
36
|
+
Style/ConstantName:
|
37
|
+
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
38
|
+
StyleGuide: '#screaming-snake-case'
|
39
|
+
|
40
|
+
Layout/EndOfLine:
|
41
|
+
Description: 'Use Unix-style line endings.'
|
42
|
+
StyleGuide: '#crlf'
|
43
|
+
|
44
|
+
Layout/ExtraSpacing:
|
45
|
+
Description: 'Do not use unnecessary spacing.'
|
46
|
+
|
47
|
+
Layout/IndentationWidth:
|
48
|
+
Description: 'Use 2 spaces for indentation.'
|
49
|
+
StyleGuide: '#spaces-indentation'
|
50
|
+
|
51
|
+
Style/TrailingCommaInArguments:
|
52
|
+
Description: 'Checks for trailing comma in argument lists.'
|
53
|
+
StyleGuide: '#no-trailing-params-comma'
|
54
|
+
|
55
|
+
Style/TrailingCommaInLiteral:
|
56
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
57
|
+
StyleGuide: '#no-trailing-array-commas'
|
58
|
+
|
59
|
+
Style/DoubleNegation:
|
60
|
+
Description: 'Checks for uses of double negation (!!).'
|
61
|
+
StyleGuide: '#no-bang-bang'
|
62
|
+
|
63
|
+
Layout/ElseAlignment:
|
64
|
+
Description: 'Align elses and elsifs correctly.'
|
65
|
+
|
66
|
+
Style/EmptyElse:
|
67
|
+
Description: 'Avoid empty else-clauses.'
|
68
|
+
|
69
|
+
Style/EmptyCaseCondition:
|
70
|
+
Description: 'Avoid empty condition in case statements.'
|
71
|
+
|
72
|
+
Layout/EmptyLineBetweenDefs:
|
73
|
+
Description: 'Use empty lines between defs.'
|
74
|
+
StyleGuide: '#empty-lines-between-methods'
|
75
|
+
|
76
|
+
Layout/EmptyLinesAroundAccessModifier:
|
77
|
+
Description: "Keep blank lines around access modifiers."
|
78
|
+
|
79
|
+
Layout/EmptyLines:
|
80
|
+
Description: "Don't use several empty lines in a row."
|
81
|
+
|
82
|
+
Layout/EmptyLinesAroundBlockBody:
|
83
|
+
Description: "Keeps track of empty lines around block bodies."
|
84
|
+
|
85
|
+
Layout/EmptyLinesAroundClassBody:
|
86
|
+
Description: "Keeps track of empty lines around class bodies."
|
87
|
+
|
88
|
+
Layout/EmptyLinesAroundModuleBody:
|
89
|
+
Description: "Keeps track of empty lines around module bodies."
|
90
|
+
|
91
|
+
Layout/EmptyLinesAroundMethodBody:
|
92
|
+
Description: "Keeps track of empty lines around method bodies."
|
93
|
+
|
94
|
+
Style/EmptyLiteral:
|
95
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
96
|
+
StyleGuide: '#literal-array-hash'
|
97
|
+
|
98
|
+
Style/EmptyMethod:
|
99
|
+
Description: 'Checks the formatting of empty method definitions.'
|
100
|
+
StyleGuide: '#no-single-line-methods'
|
101
|
+
|
102
|
+
Style/FileName:
|
103
|
+
Description: 'Use snake_case for source file names.'
|
104
|
+
StyleGuide: '#snake-case-files'
|
105
|
+
|
106
|
+
Layout/FirstParameterIndentation:
|
107
|
+
Description: 'Checks the indentation of the first parameter in a method call.'
|
108
|
+
|
109
|
+
Style/HashSyntax:
|
110
|
+
Description: >-
|
111
|
+
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
112
|
+
{ :a => 1, :b => 2 }.
|
113
|
+
StyleGuide: '#hash-literals'
|
114
|
+
|
115
|
+
Layout/IndentHash:
|
116
|
+
Description: 'Checks the indentation of the first key in a hash literal.'
|
117
|
+
|
118
|
+
Style/MethodCallWithoutArgsParentheses:
|
119
|
+
Description: 'Do not use parentheses for method calls with no arguments.'
|
120
|
+
StyleGuide: '#method-invocation-parens'
|
121
|
+
|
122
|
+
Style/RedundantParentheses:
|
123
|
+
Description: "Checks for parentheses that seem not to serve any purpose."
|
124
|
+
|
125
|
+
Style/RedundantReturn:
|
126
|
+
Description: "Don't use return where it's not required."
|
127
|
+
StyleGuide: '#no-explicit-return'
|
128
|
+
|
129
|
+
Style/SafeNavigation:
|
130
|
+
Description: >-
|
131
|
+
This cop transforms usages of a method call safeguarded by
|
132
|
+
a check for the existance of the object to
|
133
|
+
safe navigation (`&.`).
|
134
|
+
|
135
|
+
Layout/SpaceBeforeFirstArg:
|
136
|
+
Description: >-
|
137
|
+
Checks that exactly one space is used between a method name
|
138
|
+
and the first argument for method calls without parentheses.
|
139
|
+
|
140
|
+
Layout/SpaceAfterColon:
|
141
|
+
Description: 'Use spaces after colons.'
|
142
|
+
StyleGuide: '#spaces-operators'
|
143
|
+
|
144
|
+
Layout/SpaceBeforeComma:
|
145
|
+
Description: 'No spaces before commas.'
|
146
|
+
|
147
|
+
Layout/SpaceAfterComma:
|
148
|
+
Description: 'Use spaces after commas.'
|
149
|
+
StyleGuide: '#spaces-operators'
|
150
|
+
|
151
|
+
Layout/SpaceAfterMethodName:
|
152
|
+
Description: >-
|
153
|
+
Do not put a space between a method name and the opening
|
154
|
+
parenthesis in a method definition.
|
155
|
+
StyleGuide: '#parens-no-spaces'
|
156
|
+
|
157
|
+
Layout/SpaceInsideParens:
|
158
|
+
Description: 'No spaces after ( or before ).'
|
159
|
+
StyleGuide: '#no-spaces-braces'
|
160
|
+
|
161
|
+
Layout/SpaceBeforeSemicolon:
|
162
|
+
Description: 'No spaces before semicolons.'
|
163
|
+
|
164
|
+
Layout/Tab:
|
165
|
+
Description: 'No hard tabs.'
|
166
|
+
StyleGuide: '#spaces-indentation'
|
167
|
+
|
168
|
+
Layout/TrailingWhitespace:
|
169
|
+
Description: 'Avoid trailing whitespace.'
|
170
|
+
StyleGuide: '#no-trailing-whitespace'
|
171
|
+
|
172
|
+
Layout/TrailingBlankLines:
|
173
|
+
Description: 'Checks trailing blank lines and final newline.'
|
174
|
+
StyleGuide: '#newline-eof'
|
175
|
+
|
176
|
+
Style/ZeroLengthPredicate:
|
177
|
+
Description: 'Use #empty? when testing for objects of length 0.'
|
178
|
+
|
179
|
+
Style/Encoding:
|
180
|
+
Description: 'Use UTF-8 as the source file encoding.'
|
181
|
+
StyleGuide: '#utf-8'
|
182
|
+
|
183
|
+
######### METRICS #########
|
184
|
+
|
185
|
+
######### PERFORMANCE #########
|
186
|
+
|
187
|
+
Performance/Size:
|
188
|
+
Description: >-
|
189
|
+
Use `size` instead of `count` for counting
|
190
|
+
the number of elements in `Array` and `Hash`.
|
191
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
192
|
+
|
193
|
+
######### RAILS #########
|
194
|
+
|
195
|
+
Rails/ActionFilter:
|
196
|
+
Description: 'Enforces consistent use of action filter methods.'
|
197
|
+
|
198
|
+
Rails/ApplicationRecord:
|
199
|
+
Description: 'Models subclass ApplicationRecord with Rails 5.0'
|
200
|
+
Enabled: false
|
201
|
+
|
202
|
+
Rails/EnumUniqueness:
|
203
|
+
Description: 'Avoid duplicate integers in hash-syntax `enum` declaration.'
|
204
|
+
|
205
|
+
Rails/DynamicFindBy:
|
206
|
+
Description: 'Use `find_by` instead of dynamic `find_by_*`.'
|
207
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by'
|
208
|
+
|
209
|
+
Rails/Output:
|
210
|
+
Description: 'Checks for calls to puts, print, etc.'
|
211
|
+
|
212
|
+
Rails/SafeNavigation:
|
213
|
+
Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`"
|
214
|
+
|
215
|
+
Rails/Date:
|
216
|
+
Description: >-
|
217
|
+
Checks the correct usage of date aware methods,
|
218
|
+
such as Date.today, Date.current etc.
|
219
|
+
|
220
|
+
Rails/Delegate:
|
221
|
+
Description: 'Prefer delegate method for delegations.'
|
222
|
+
|
223
|
+
Rails/TimeZone:
|
224
|
+
Description: 'Checks the correct usage of time zone aware methods.'
|
225
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
226
|
+
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
227
|
+
|
228
|
+
Rails/FindBy:
|
229
|
+
Description: 'Prefer find_by over where.first.'
|
230
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by'
|
231
|
+
|
232
|
+
Rails/FindEach:
|
233
|
+
Description: 'Prefer all.find_each over all.find.'
|
234
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find-each'
|
235
|
+
|
236
|
+
Rails/HasAndBelongsToMany:
|
237
|
+
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
238
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#has-many-through'
|
239
|
+
|
240
|
+
Rails/PluralizationGrammar:
|
241
|
+
Description: 'Checks for incorrect grammar when using methods like `3.day.ago`.'
|
242
|
+
|
243
|
+
Rails/SkipsModelValidations:
|
244
|
+
Description: 'Checks for use of methods which skip validations.'
|
245
|
+
|
246
|
+
Rails/UniqBeforePluck:
|
247
|
+
Description: 'Prefer the use of uniq or distinct before pluck.'
|
248
|
+
|
249
|
+
Rails/Validation:
|
250
|
+
Description: 'Use validates :attribute, hash of validations.'
|
251
|
+
|
252
|
+
Security/JSONLoad:
|
253
|
+
Description: >-
|
254
|
+
Prefer usage of `JSON.parse` over `JSON.load` due to potential
|
255
|
+
security issues. See reference for more information.
|
256
|
+
Reference: 'http://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load'
|
257
|
+
# Autocorrect here will change to a method that may cause crashes depending
|
258
|
+
# on the value of the argument.
|
259
|
+
AutoCorrect: false
|
260
|
+
|
261
|
+
Rails/SaveBang:
|
262
|
+
Description: 'Identifies possible cases where Active Record save! or related should be used.'
|
263
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#save-bang'
|
264
|
+
|
265
|
+
######### Bundler #########
|
266
|
+
|
267
|
+
Bundler/DuplicatedGem:
|
268
|
+
Description: 'Checks for duplicate gem entries in Gemfile.'
|
269
|
+
Include:
|
270
|
+
- '**/Gemfile'
|
271
|
+
- '**/gems.rb'
|
272
|
+
|
273
|
+
######### LINT #########
|
274
|
+
|
275
|
+
Lint/AmbiguousOperator:
|
276
|
+
Description: >-
|
277
|
+
Checks for ambiguous operators in the first argument of a
|
278
|
+
method invocation without parentheses.
|
279
|
+
StyleGuide: '#method-invocation-parens'
|
280
|
+
|
281
|
+
Lint/AmbiguousRegexpLiteral:
|
282
|
+
Description: >-
|
283
|
+
Checks for ambiguous regexp literals in the first argument of
|
284
|
+
a method invocation without parentheses.
|
285
|
+
|
286
|
+
Lint/AssignmentInCondition:
|
287
|
+
Description: "Don't use assignment in conditions."
|
288
|
+
StyleGuide: '#safe-assignment-in-condition'
|
289
|
+
|
290
|
+
Lint/BlockAlignment:
|
291
|
+
Description: 'Align block ends correctly.'
|
292
|
+
|
293
|
+
Lint/CircularArgumentReference:
|
294
|
+
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
|
295
|
+
|
296
|
+
Lint/ConditionPosition:
|
297
|
+
Description: >-
|
298
|
+
Checks for condition placed in a confusing position relative to
|
299
|
+
the keyword.
|
300
|
+
StyleGuide: '#same-line-condition'
|
301
|
+
|
302
|
+
Lint/Debugger:
|
303
|
+
Description: 'Check for debugger calls.'
|
304
|
+
|
305
|
+
Lint/DefEndAlignment:
|
306
|
+
Description: 'Align ends corresponding to defs correctly.'
|
307
|
+
|
308
|
+
Lint/DeprecatedClassMethods:
|
309
|
+
Description: 'Check for deprecated class method calls.'
|
310
|
+
|
311
|
+
Lint/DuplicateCaseCondition:
|
312
|
+
Description: 'Do not repeat values in case conditionals.'
|
313
|
+
|
314
|
+
Lint/DuplicateMethods:
|
315
|
+
Description: 'Check for duplicate method definitions.'
|
316
|
+
|
317
|
+
Lint/DuplicatedKey:
|
318
|
+
Description: 'Check for duplicate keys in hash literals.'
|
319
|
+
|
320
|
+
Lint/EachWithObjectArgument:
|
321
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
322
|
+
|
323
|
+
Lint/ElseLayout:
|
324
|
+
Description: 'Check for odd code arrangement in an else block.'
|
325
|
+
|
326
|
+
Lint/EmptyEnsure:
|
327
|
+
Description: 'Checks for empty ensure block.'
|
328
|
+
|
329
|
+
Lint/EmptyExpression:
|
330
|
+
Description: 'Checks for empty expressions.'
|
331
|
+
|
332
|
+
Lint/EmptyInterpolation:
|
333
|
+
Description: 'Checks for empty string interpolation.'
|
334
|
+
|
335
|
+
Lint/EmptyWhen:
|
336
|
+
Description: 'Checks for `when` branches with empty bodies.'
|
337
|
+
|
338
|
+
Lint/EndAlignment:
|
339
|
+
Description: 'Align ends correctly.'
|
340
|
+
|
341
|
+
Lint/EndInMethod:
|
342
|
+
Description: 'END blocks should not be placed inside method definitions.'
|
343
|
+
|
344
|
+
Lint/EnsureReturn:
|
345
|
+
Description: 'Do not use return in an ensure block.'
|
346
|
+
StyleGuide: '#no-return-ensure'
|
347
|
+
|
348
|
+
Lint/FloatOutOfRange:
|
349
|
+
Description: >-
|
350
|
+
Catches floating-point literals too large or small for Ruby to
|
351
|
+
represent.
|
352
|
+
|
353
|
+
Lint/FormatParameterMismatch:
|
354
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
355
|
+
|
356
|
+
Lint/HandleExceptions:
|
357
|
+
Description: "Don't suppress exception."
|
358
|
+
StyleGuide: '#dont-hide-exceptions'
|
359
|
+
|
360
|
+
Lint/ImplicitStringConcatenation:
|
361
|
+
Description: >-
|
362
|
+
Checks for adjacent string literals on the same line, which
|
363
|
+
could better be represented as a single string literal.
|
364
|
+
|
365
|
+
Lint/IneffectiveAccessModifier:
|
366
|
+
Description: >-
|
367
|
+
Checks for attempts to use `private` or `protected` to set
|
368
|
+
the visibility of a class method, which does not work.
|
369
|
+
|
370
|
+
Lint/InheritException:
|
371
|
+
Description: 'Avoid inheriting from the `Exception` class.'
|
372
|
+
|
373
|
+
Lint/InvalidCharacterLiteral:
|
374
|
+
Description: >-
|
375
|
+
Checks for invalid character literals with a non-escaped
|
376
|
+
whitespace character.
|
377
|
+
|
378
|
+
Lint/LiteralInCondition:
|
379
|
+
Description: 'Checks of literals used in conditions.'
|
380
|
+
|
381
|
+
Lint/LiteralInInterpolation:
|
382
|
+
Description: 'Checks for literals used in interpolation.'
|
383
|
+
|
384
|
+
Lint/Loop:
|
385
|
+
Description: >-
|
386
|
+
Use Kernel#loop with break rather than begin/end/until or
|
387
|
+
begin/end/while for post-loop tests.
|
388
|
+
StyleGuide: '#loop-with-break'
|
389
|
+
|
390
|
+
Lint/NestedMethodDefinition:
|
391
|
+
Description: 'Do not use nested method definitions.'
|
392
|
+
StyleGuide: '#no-nested-methods'
|
393
|
+
|
394
|
+
Lint/NextWithoutAccumulator:
|
395
|
+
Description: >-
|
396
|
+
Do not omit the accumulator when calling `next`
|
397
|
+
in a `reduce`/`inject` block.
|
398
|
+
|
399
|
+
Lint/NonLocalExitFromIterator:
|
400
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
401
|
+
|
402
|
+
Lint/ParenthesesAsGroupedExpression:
|
403
|
+
Description: >-
|
404
|
+
Checks for method calls with a space before the opening
|
405
|
+
parenthesis.
|
406
|
+
StyleGuide: '#parens-no-spaces'
|
407
|
+
|
408
|
+
Lint/PercentStringArray:
|
409
|
+
Description: >-
|
410
|
+
Checks for unwanted commas and quotes in %w/%W literals.
|
411
|
+
|
412
|
+
Lint/PercentSymbolArray:
|
413
|
+
Description: >-
|
414
|
+
Checks for unwanted commas and colons in %i/%I literals.
|
415
|
+
|
416
|
+
Lint/RandOne:
|
417
|
+
Description: >-
|
418
|
+
Checks for `rand(1)` calls. Such calls always return `0`
|
419
|
+
and most likely a mistake.
|
420
|
+
|
421
|
+
Lint/RequireParentheses:
|
422
|
+
Description: >-
|
423
|
+
Use parentheses in the method call to avoid confusion
|
424
|
+
about precedence.
|
425
|
+
|
426
|
+
Lint/RescueException:
|
427
|
+
Description: 'Avoid rescuing the Exception class.'
|
428
|
+
StyleGuide: '#no-blind-rescues'
|
429
|
+
|
430
|
+
Lint/ShadowedException:
|
431
|
+
Description: >-
|
432
|
+
Avoid rescuing a higher level exception
|
433
|
+
before a lower level exception.
|
434
|
+
|
435
|
+
Lint/ShadowingOuterLocalVariable:
|
436
|
+
Description: >-
|
437
|
+
Do not use the same name as outer local variable
|
438
|
+
for block arguments or block local variables.
|
439
|
+
|
440
|
+
Lint/StringConversionInInterpolation:
|
441
|
+
Description: 'Checks for Object#to_s usage in string interpolation.'
|
442
|
+
StyleGuide: '#no-to-s'
|
443
|
+
|
444
|
+
Lint/UnderscorePrefixedVariableName:
|
445
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
446
|
+
|
447
|
+
Lint/UnifiedInteger:
|
448
|
+
Description: 'Use Integer instead of Fixnum or Bignum'
|
449
|
+
|
450
|
+
Lint/UnneededDisable:
|
451
|
+
Description: >-
|
452
|
+
Checks for rubocop:disable comments that can be removed.
|
453
|
+
Note: this cop is not disabled when disabling all cops.
|
454
|
+
It must be explicitly disabled.
|
455
|
+
|
456
|
+
Lint/UnneededSplatExpansion:
|
457
|
+
Description: 'Checks for splat unnecessarily being called on literals'
|
458
|
+
|
459
|
+
Lint/UnusedBlockArgument:
|
460
|
+
Description: 'Checks for unused block arguments.'
|
461
|
+
StyleGuide: '#underscore-unused-vars'
|
462
|
+
|
463
|
+
Lint/UnusedMethodArgument:
|
464
|
+
Description: 'Checks for unused method arguments.'
|
465
|
+
StyleGuide: '#underscore-unused-vars'
|
466
|
+
|
467
|
+
Lint/UnreachableCode:
|
468
|
+
Description: 'Unreachable code.'
|
469
|
+
|
470
|
+
Lint/UselessAccessModifier:
|
471
|
+
Description: 'Checks for useless access modifiers.'
|
472
|
+
ContextCreatingMethods: []
|
473
|
+
|
474
|
+
Lint/UselessAssignment:
|
475
|
+
Description: 'Checks for useless assignment to a local variable.'
|
476
|
+
StyleGuide: '#underscore-unused-vars'
|
477
|
+
|
478
|
+
Lint/UselessComparison:
|
479
|
+
Description: 'Checks for comparison of something with itself.'
|
480
|
+
|
481
|
+
Lint/UselessElseWithoutRescue:
|
482
|
+
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
483
|
+
|
484
|
+
Lint/UselessSetterCall:
|
485
|
+
Description: 'Checks for useless setter call to a local variable.'
|
486
|
+
|
487
|
+
Lint/Void:
|
488
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
data/lib/arcadia_cops/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arcadia_cops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- justin
|
@@ -32,6 +32,8 @@ extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
34
|
- lib/arcadia_cops.rb
|
35
|
+
- lib/arcadia_cops/config.yml
|
36
|
+
- lib/arcadia_cops/enabled.yml
|
35
37
|
- lib/arcadia_cops/version.rb
|
36
38
|
homepage: https://github.com/ArcadiaPower/rubocop/
|
37
39
|
licenses:
|