falkor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- data/.github/logo.jpg +0 -0
- data/.github/workflows/coverage.yml +24 -0
- data/.github/workflows/lint.yml +19 -0
- data/.github/workflows/tests.yml +22 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +1600 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +14 -0
- data/LICENSE.txt +21 -0
- data/README.md +61 -0
- data/Rakefile +12 -0
- data/bin/console +19 -0
- data/bin/publish +65 -0
- data/bin/setup +8 -0
- data/falkor.gemspec +35 -0
- data/lib/falkor.rb +16 -0
- data/lib/falkor/concerns/installable.rb +50 -0
- data/lib/falkor/concerns/trackable_progress.rb +14 -0
- data/lib/falkor/download.rb +70 -0
- data/lib/falkor/extract/gem.rb +46 -0
- data/lib/falkor/extract/tar_gz.rb +117 -0
- data/lib/falkor/gem.rb +93 -0
- data/lib/falkor/progress.rb +28 -0
- data/lib/falkor/ruby.rb +68 -0
- data/lib/falkor/version.rb +5 -0
- data/lib/falkor/yard/documentation.rb +67 -0
- data/lib/falkor/yard/parser.rb +31 -0
- data/lib/falkor/yard/parser/global_state.rb +24 -0
- metadata +152 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 762a9a1f4ab5c54fe3b44b5aa7ad1a292005be4842e91bd6b2e1f901a5a17878
|
4
|
+
data.tar.gz: 9423a7bc95359c8049a04d48b3a5ff8563dbf27d12d84cf3411404917a5980dd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 13045495b4f0512c5023a993bd6a10fa2b01273658a629f03714a882d817c9fc17dc57d07d7804ac3257d27f8c41f95dc0deb18b716fa2b59461829864e744bf
|
7
|
+
data.tar.gz: 6e0db6d8ed074654459a23a7e33607948c18c4bd7dce58025ec83d5fba58bc374009dafe7093e8abfe90610171e9aafad8116e46119789464b167ad7345bc286
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: bug
|
6
|
+
assignees: npezza93
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**To Reproduce**
|
14
|
+
Steps to reproduce the behavior:
|
15
|
+
1.
|
16
|
+
|
17
|
+
**Expected behavior**
|
18
|
+
A clear and concise description of what you expected to happen.
|
19
|
+
|
20
|
+
**Screenshots**
|
21
|
+
If applicable, add screenshots to help explain your problem.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for this project
|
4
|
+
title: ''
|
5
|
+
labels: enhancement
|
6
|
+
assignees: npezza93
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
data/.github/logo.jpg
ADDED
Binary file
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: coverage
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
report:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v1
|
10
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
11
|
+
uses: actions/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 2.6.x
|
14
|
+
- name: Install dependencies
|
15
|
+
run: |
|
16
|
+
gem install bundler --no-document
|
17
|
+
bundle install
|
18
|
+
- name: Test & publish code coverage
|
19
|
+
uses: paambaati/codeclimate-action@v2.2.0
|
20
|
+
env:
|
21
|
+
CC_TEST_REPORTER_ID: e69352ed5eb922f14876e79f2393bcba2496824f15cb3334f263d4f8780eb0c8
|
22
|
+
COV: 1
|
23
|
+
with:
|
24
|
+
coverageCommand: bundle exec rake test
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: lint
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
lint:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v1
|
10
|
+
- name: Set up Ruby 2.6
|
11
|
+
uses: actions/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 2.6.x
|
14
|
+
- name: Install dependencies
|
15
|
+
run: |
|
16
|
+
gem install bundler --no-document
|
17
|
+
bundle install
|
18
|
+
- name: Run tests
|
19
|
+
run: bundle exec rubocop --config=./.rubocop.yml --parallel
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: tests
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
unit:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [ '2.5.x', '2.6.x' ]
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v1
|
13
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
17
|
+
- name: Install dependencies
|
18
|
+
run: |
|
19
|
+
gem install bundler --no-document
|
20
|
+
bundle install
|
21
|
+
- name: Run tests
|
22
|
+
run: bundle exec rake test
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,1600 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
AllCops:
|
4
|
+
Exclude:
|
5
|
+
- vendor/**/*
|
6
|
+
- Gemfile.lock
|
7
|
+
- db/schema.rb
|
8
|
+
- node_modules/**/*
|
9
|
+
- tmp/**/*
|
10
|
+
- test/dummy/db/schema.rb
|
11
|
+
- gemfiles/**/*
|
12
|
+
TargetRubyVersion: 2.5
|
13
|
+
|
14
|
+
# Department Bundler
|
15
|
+
Bundler/DuplicatedGem:
|
16
|
+
Description: Checks for duplicate gem entries in Gemfile.
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Bundler/InsecureProtocolSource:
|
20
|
+
Description: The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Bundler/OrderedGems:
|
24
|
+
Description: Gems within groups in the Gemfile should be alphabetically sorted.
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
# Department Gemspec
|
28
|
+
Gemspec/OrderedDependencies:
|
29
|
+
Description: Dependencies in the gemspec should be alphabetically sorted.
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
# Department Layout
|
33
|
+
Layout/AccessModifierIndentation:
|
34
|
+
Description: Check indentation of private/protected visibility modifiers.
|
35
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Layout/AlignArray:
|
39
|
+
Description: Align the elements of an array literal if they span more than one line.
|
40
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
Layout/AlignHash:
|
44
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Layout/AlignParameters:
|
48
|
+
Description: Align the parameters of a method call if they span more than one line.
|
49
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
Layout/BlockEndNewline:
|
53
|
+
Description: Put end statement of multiline block on its own line.
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Layout/CaseIndentation:
|
57
|
+
Description: Indentation of when in a case/when/[else/]end.
|
58
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
59
|
+
Enabled: true
|
60
|
+
|
61
|
+
Layout/ClosingParenthesisIndentation:
|
62
|
+
Description: Checks the indentation of hanging closing parentheses.
|
63
|
+
Enabled: false
|
64
|
+
|
65
|
+
Layout/CommentIndentation:
|
66
|
+
Description: Indentation of comments.
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Layout/DotPosition:
|
70
|
+
Description: Checks the position of the dot in multi-line method calls.
|
71
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
72
|
+
Enabled: true
|
73
|
+
EnforcedStyle: trailing
|
74
|
+
|
75
|
+
Layout/ElseAlignment:
|
76
|
+
Description: Align elses and elsifs correctly.
|
77
|
+
Enabled: true
|
78
|
+
|
79
|
+
Layout/EmptyLineBetweenDefs:
|
80
|
+
Description: Use empty lines between defs.
|
81
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Layout/EmptyLines:
|
85
|
+
Description: Don't use several empty lines in a row.
|
86
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#two-or-more-empty-lines
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
Layout/EmptyLinesAroundAccessModifier:
|
90
|
+
Description: Keep blank lines around access modifiers.
|
91
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-access-modifier
|
92
|
+
Enabled: false
|
93
|
+
|
94
|
+
Layout/EmptyLinesAroundBeginBody:
|
95
|
+
Description: Keeps track of empty lines around begin-end bodies.
|
96
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
Layout/EmptyLinesAroundBlockBody:
|
100
|
+
Description: Keeps track of empty lines around block bodies.
|
101
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
102
|
+
Enabled: false
|
103
|
+
|
104
|
+
Layout/EmptyLinesAroundClassBody:
|
105
|
+
Description: Keeps track of empty lines around class bodies.
|
106
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
107
|
+
Enabled: false
|
108
|
+
|
109
|
+
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
110
|
+
Description: Keeps track of empty lines around exception handling keywords.
|
111
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
112
|
+
Enabled: false
|
113
|
+
|
114
|
+
Layout/EmptyLinesAroundModuleBody:
|
115
|
+
Description: Keeps track of empty lines around module bodies.
|
116
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
117
|
+
Enabled: false
|
118
|
+
|
119
|
+
Layout/EmptyLinesAroundMethodBody:
|
120
|
+
Description: Keeps track of empty lines around method bodies.
|
121
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
Layout/EndOfLine:
|
125
|
+
Description: Use Unix-style line endings.
|
126
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
127
|
+
Enabled: false
|
128
|
+
|
129
|
+
Layout/ExtraSpacing:
|
130
|
+
Description: Do not use unnecessary spacing.
|
131
|
+
Enabled: true
|
132
|
+
|
133
|
+
Layout/FirstArrayElementLineBreak:
|
134
|
+
Description: Checks for a line break before the first element in a multi-line array.
|
135
|
+
Enabled: false
|
136
|
+
|
137
|
+
Layout/FirstHashElementLineBreak:
|
138
|
+
Description: Checks for a line break before the first element in a multi-line hash.
|
139
|
+
Enabled: false
|
140
|
+
|
141
|
+
Layout/FirstMethodArgumentLineBreak:
|
142
|
+
Description: Checks for a line break before the first argument in a multi-line method call.
|
143
|
+
Enabled: false
|
144
|
+
|
145
|
+
Layout/FirstMethodParameterLineBreak:
|
146
|
+
Description: Checks for a line break before the first parameter in a multi-line method parameter definition.
|
147
|
+
Enabled: false
|
148
|
+
|
149
|
+
Layout/InitialIndentation:
|
150
|
+
Description: Checks the indentation of the first non-blank non-comment line in a file.
|
151
|
+
Enabled: false
|
152
|
+
|
153
|
+
Layout/IndentFirstArgument:
|
154
|
+
Description: Checks the indentation of the first parameter in a method call.
|
155
|
+
Enabled: false
|
156
|
+
|
157
|
+
Layout/IndentationConsistency:
|
158
|
+
Description: Keep indentation straight.
|
159
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
160
|
+
Enabled: false
|
161
|
+
|
162
|
+
Layout/IndentationWidth:
|
163
|
+
Description: Use 2 spaces for indentation.
|
164
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
165
|
+
Enabled: true
|
166
|
+
|
167
|
+
Layout/IndentFirstArrayElement:
|
168
|
+
Description: Checks the indentation of the first element in an array literal.
|
169
|
+
Enabled: false
|
170
|
+
|
171
|
+
Layout/IndentAssignment:
|
172
|
+
Description: Checks the indentation of the first line of the right-hand-side of a multi-line assignment.
|
173
|
+
Enabled: true
|
174
|
+
|
175
|
+
Layout/IndentFirstHashElement:
|
176
|
+
Description: Checks the indentation of the first key in a hash literal.
|
177
|
+
Enabled: false
|
178
|
+
|
179
|
+
Layout/IndentHeredoc:
|
180
|
+
Description: This cops checks the indentation of the here document bodies.
|
181
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#squiggly-heredocs
|
182
|
+
Enabled: true
|
183
|
+
|
184
|
+
Layout/SpaceInLambdaLiteral:
|
185
|
+
Description: Checks for spaces in lambda literals.
|
186
|
+
Enabled: true
|
187
|
+
|
188
|
+
Layout/LeadingCommentSpace:
|
189
|
+
Description: Comments should start with a space.
|
190
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
191
|
+
Enabled: true
|
192
|
+
|
193
|
+
Layout/MultilineArrayBraceLayout:
|
194
|
+
Description: Checks that the closing brace in an array literal is either on the same line as the last array element, or a new line.
|
195
|
+
Enabled: true
|
196
|
+
|
197
|
+
Layout/MultilineAssignmentLayout:
|
198
|
+
Description: Check for a newline after the assignment operator in multi-line assignments.
|
199
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guid#indent-conditional-assignment
|
200
|
+
Enabled: false
|
201
|
+
|
202
|
+
Layout/MultilineBlockLayout:
|
203
|
+
Description: Ensures newlines after multiline block do statements.
|
204
|
+
Enabled: true
|
205
|
+
|
206
|
+
Layout/MultilineHashBraceLayout:
|
207
|
+
Description: Checks that the closing brace in a hash literal is either on the same line as the last hash element, or a new line.
|
208
|
+
Enabled: true
|
209
|
+
|
210
|
+
Layout/MultilineMethodCallBraceLayout:
|
211
|
+
Description: Checks that the closing brace in a method call is either on the same line as the last method argument, or a new line.
|
212
|
+
Enabled: true
|
213
|
+
|
214
|
+
Layout/MultilineMethodCallIndentation:
|
215
|
+
Description: Checks indentation of method calls with the dot operator that span more than one line.
|
216
|
+
Enabled: true
|
217
|
+
|
218
|
+
Layout/MultilineMethodDefinitionBraceLayout:
|
219
|
+
Description: Checks that the closing brace in a method definition is either on the same line as the last method parameter, or a new line.
|
220
|
+
Enabled: true
|
221
|
+
|
222
|
+
Layout/MultilineOperationIndentation:
|
223
|
+
Description: Checks indentation of binary operations that span more than one line.
|
224
|
+
Enabled: false
|
225
|
+
|
226
|
+
Layout/EmptyLineAfterMagicComment:
|
227
|
+
Description: Add an empty line after magic comments to separate them from code.
|
228
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code
|
229
|
+
Enabled: true
|
230
|
+
|
231
|
+
Layout/RescueEnsureAlignment:
|
232
|
+
Description: Align rescues and ensures correctly.
|
233
|
+
Enabled: false
|
234
|
+
|
235
|
+
Layout/SpaceBeforeFirstArg:
|
236
|
+
Description: Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.
|
237
|
+
Enabled: true
|
238
|
+
|
239
|
+
Layout/SpaceAfterColon:
|
240
|
+
Description: Use spaces after colons.
|
241
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
242
|
+
Enabled: true
|
243
|
+
|
244
|
+
Layout/SpaceAfterComma:
|
245
|
+
Description: Use spaces after commas.
|
246
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
247
|
+
Enabled: true
|
248
|
+
|
249
|
+
Layout/SpaceAfterMethodName:
|
250
|
+
Description: Do not put a space between a method name and the opening parenthesis in a method definition.
|
251
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
252
|
+
Enabled: true
|
253
|
+
|
254
|
+
Layout/SpaceAfterNot:
|
255
|
+
Description: Tracks redundant space after the ! operator.
|
256
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
257
|
+
Enabled: false
|
258
|
+
|
259
|
+
Layout/SpaceAfterSemicolon:
|
260
|
+
Description: Use spaces after semicolons.
|
261
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
262
|
+
Enabled: true
|
263
|
+
|
264
|
+
Layout/SpaceBeforeBlockBraces:
|
265
|
+
Description: Checks that the left block brace has or doesn't have space before it.
|
266
|
+
Enabled: false
|
267
|
+
|
268
|
+
Layout/SpaceBeforeComma:
|
269
|
+
Description: No spaces before commas.
|
270
|
+
Enabled: false
|
271
|
+
|
272
|
+
Layout/SpaceBeforeComment:
|
273
|
+
Description: Checks for missing space between code and a comment on the same line.
|
274
|
+
Enabled: false
|
275
|
+
|
276
|
+
Layout/SpaceBeforeSemicolon:
|
277
|
+
Description: No spaces before semicolons.
|
278
|
+
Enabled: false
|
279
|
+
|
280
|
+
Layout/SpaceInsideBlockBraces:
|
281
|
+
Description: Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space.
|
282
|
+
Enabled: false
|
283
|
+
|
284
|
+
Layout/SpaceAroundBlockParameters:
|
285
|
+
Description: Checks the spacing inside and after block parameters pipes.
|
286
|
+
Enabled: true
|
287
|
+
|
288
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
289
|
+
Description: Checks that the equals signs in parameter default assignments have or don't have surrounding space depending on configuration.
|
290
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
291
|
+
Enabled: true
|
292
|
+
|
293
|
+
Layout/SpaceAroundKeyword:
|
294
|
+
Description: Use a space around keywords if appropriate.
|
295
|
+
Enabled: true
|
296
|
+
|
297
|
+
Layout/SpaceAroundOperators:
|
298
|
+
Description: Use a single space around operators.
|
299
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
300
|
+
Enabled: true
|
301
|
+
|
302
|
+
Layout/SpaceInsideArrayPercentLiteral:
|
303
|
+
Description: No unnecessary additional spaces between elements in %i/%w literals.
|
304
|
+
Enabled: true
|
305
|
+
|
306
|
+
Layout/SpaceInsidePercentLiteralDelimiters:
|
307
|
+
Description: No unnecessary spaces inside delimiters of %i/%w/%x literals.
|
308
|
+
Enabled: true
|
309
|
+
|
310
|
+
Layout/SpaceInsideHashLiteralBraces:
|
311
|
+
Description: Use spaces inside hash literal braces - or don't.
|
312
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
313
|
+
Enabled: true
|
314
|
+
|
315
|
+
Layout/SpaceInsideParens:
|
316
|
+
Description: No spaces after ( or before ).
|
317
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
318
|
+
Enabled: true
|
319
|
+
|
320
|
+
Layout/SpaceInsideRangeLiteral:
|
321
|
+
Description: No spaces inside range literals.
|
322
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
323
|
+
Enabled: true
|
324
|
+
|
325
|
+
Layout/SpaceInsideStringInterpolation:
|
326
|
+
Description: Checks for padding/surrounding spaces inside string interpolation.
|
327
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
|
328
|
+
Enabled: false
|
329
|
+
|
330
|
+
Layout/Tab:
|
331
|
+
Description: No hard tabs.
|
332
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
333
|
+
Enabled: false
|
334
|
+
|
335
|
+
Layout/TrailingBlankLines:
|
336
|
+
Description: Checks trailing blank lines and final newline.
|
337
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
338
|
+
Enabled: false
|
339
|
+
|
340
|
+
Layout/TrailingWhitespace:
|
341
|
+
Description: Avoid trailing whitespace.
|
342
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
343
|
+
Enabled: false
|
344
|
+
|
345
|
+
# Department Lint
|
346
|
+
Lint/AmbiguousBlockAssociation:
|
347
|
+
Description: Checks for ambiguous block association with method when param passed without parentheses.
|
348
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#syntax
|
349
|
+
Enabled: false
|
350
|
+
|
351
|
+
Lint/AmbiguousOperator:
|
352
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation without parentheses.
|
353
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
354
|
+
Enabled: true
|
355
|
+
|
356
|
+
Lint/AmbiguousRegexpLiteral:
|
357
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.
|
358
|
+
Enabled: true
|
359
|
+
|
360
|
+
Lint/AssignmentInCondition:
|
361
|
+
Description: Don't use assignment in conditions.
|
362
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
363
|
+
Enabled: true
|
364
|
+
|
365
|
+
Layout/BlockAlignment:
|
366
|
+
Description: Align block ends correctly.
|
367
|
+
Enabled: true
|
368
|
+
|
369
|
+
Lint/BooleanSymbol:
|
370
|
+
Description: Check for `:true` and `:false` symbols.
|
371
|
+
Enabled: true
|
372
|
+
|
373
|
+
Lint/CircularArgumentReference:
|
374
|
+
Description: Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument.
|
375
|
+
Enabled: true
|
376
|
+
|
377
|
+
Layout/ConditionPosition:
|
378
|
+
Description: Checks for condition placed in a confusing position relative to the keyword.
|
379
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
380
|
+
Enabled: true
|
381
|
+
|
382
|
+
Lint/Debugger:
|
383
|
+
Description: Check for debugger calls.
|
384
|
+
Enabled: true
|
385
|
+
|
386
|
+
Layout/DefEndAlignment:
|
387
|
+
Description: Align ends corresponding to defs correctly.
|
388
|
+
Enabled: true
|
389
|
+
|
390
|
+
Lint/DeprecatedClassMethods:
|
391
|
+
Description: Check for deprecated class method calls.
|
392
|
+
Enabled: true
|
393
|
+
|
394
|
+
Lint/DuplicateCaseCondition:
|
395
|
+
Description: Do not repeat values in case conditionals.
|
396
|
+
Enabled: true
|
397
|
+
|
398
|
+
Lint/DuplicateMethods:
|
399
|
+
Description: Check for duplicate method definitions.
|
400
|
+
Enabled: true
|
401
|
+
|
402
|
+
Lint/DuplicatedKey:
|
403
|
+
Description: Check for duplicate keys in hash literals.
|
404
|
+
Enabled: true
|
405
|
+
|
406
|
+
Lint/EachWithObjectArgument:
|
407
|
+
Description: Check for immutable argument given to each_with_object.
|
408
|
+
Enabled: true
|
409
|
+
|
410
|
+
Lint/ElseLayout:
|
411
|
+
Description: Check for odd code arrangement in an else block.
|
412
|
+
Enabled: true
|
413
|
+
|
414
|
+
Lint/EmptyEnsure:
|
415
|
+
Description: Checks for empty ensure block.
|
416
|
+
Enabled: true
|
417
|
+
AutoCorrect: false
|
418
|
+
|
419
|
+
Lint/EmptyExpression:
|
420
|
+
Description: Checks for empty expressions.
|
421
|
+
Enabled: true
|
422
|
+
|
423
|
+
Lint/EmptyInterpolation:
|
424
|
+
Description: Checks for empty string interpolation.
|
425
|
+
Enabled: true
|
426
|
+
|
427
|
+
Lint/EmptyWhen:
|
428
|
+
Description: Checks for `when` branches with empty bodies.
|
429
|
+
Enabled: true
|
430
|
+
|
431
|
+
Layout/EndAlignment:
|
432
|
+
Description: Align ends correctly.
|
433
|
+
Enabled: true
|
434
|
+
|
435
|
+
Lint/EndInMethod:
|
436
|
+
Description: END blocks should not be placed inside method definitions.
|
437
|
+
Enabled: true
|
438
|
+
|
439
|
+
Lint/EnsureReturn:
|
440
|
+
Description: Do not use return in an ensure block.
|
441
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
442
|
+
Enabled: true
|
443
|
+
|
444
|
+
Lint/FloatOutOfRange:
|
445
|
+
Description: Catches floating-point literals too large or small for Ruby to represent.
|
446
|
+
Enabled: true
|
447
|
+
|
448
|
+
Lint/FormatParameterMismatch:
|
449
|
+
Description: The number of parameters to format/sprint must match the fields.
|
450
|
+
Enabled: true
|
451
|
+
|
452
|
+
Lint/HandleExceptions:
|
453
|
+
Description: Don't suppress exception.
|
454
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
455
|
+
Enabled: true
|
456
|
+
|
457
|
+
Lint/ImplicitStringConcatenation:
|
458
|
+
Description: Checks for adjacent string literals on the same line, which could better be represented as a single string literal.
|
459
|
+
Enabled: true
|
460
|
+
|
461
|
+
Lint/IneffectiveAccessModifier:
|
462
|
+
Description: Checks for attempts to use `private` or `protected` to set the visibility of a class method, which does not work.
|
463
|
+
Enabled: true
|
464
|
+
|
465
|
+
Lint/InheritException:
|
466
|
+
Description: Avoid inheriting from the `Exception` class.
|
467
|
+
Enabled: true
|
468
|
+
|
469
|
+
Lint/InterpolationCheck:
|
470
|
+
Description: Raise warning for interpolation in single q strs
|
471
|
+
Enabled: true
|
472
|
+
|
473
|
+
Lint/LiteralAsCondition:
|
474
|
+
Description: Checks of literals used in conditions.
|
475
|
+
Enabled: true
|
476
|
+
|
477
|
+
Lint/LiteralInInterpolation:
|
478
|
+
Description: Checks for literals used in interpolation.
|
479
|
+
Enabled: true
|
480
|
+
|
481
|
+
Lint/Loop:
|
482
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while for post-loop tests.
|
483
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
484
|
+
Enabled: true
|
485
|
+
|
486
|
+
Lint/MultipleCompare:
|
487
|
+
Description: Use `&&` operator to compare multiple value.
|
488
|
+
Enabled: true
|
489
|
+
|
490
|
+
Lint/NestedMethodDefinition:
|
491
|
+
Description: Do not use nested method definitions.
|
492
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
|
493
|
+
Enabled: true
|
494
|
+
|
495
|
+
Lint/NextWithoutAccumulator:
|
496
|
+
Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
|
497
|
+
Enabled: true
|
498
|
+
|
499
|
+
Lint/NonLocalExitFromIterator:
|
500
|
+
Description: Do not use return in iterator to cause non-local exit.
|
501
|
+
Enabled: true
|
502
|
+
|
503
|
+
Lint/ParenthesesAsGroupedExpression:
|
504
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
505
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
506
|
+
Enabled: true
|
507
|
+
|
508
|
+
Lint/PercentStringArray:
|
509
|
+
Description: Checks for unwanted commas and quotes in %w/%W literals.
|
510
|
+
Enabled: true
|
511
|
+
|
512
|
+
Lint/PercentSymbolArray:
|
513
|
+
Description: Checks for unwanted commas and colons in %i/%I literals.
|
514
|
+
Enabled: true
|
515
|
+
|
516
|
+
Lint/RandOne:
|
517
|
+
Description: Checks for `rand(1)` calls. Such calls always return `0` and most likely a mistake.
|
518
|
+
Enabled: true
|
519
|
+
|
520
|
+
Lint/RedundantWithIndex:
|
521
|
+
Description: Checks for redundant `with_index`.
|
522
|
+
Enabled: true
|
523
|
+
|
524
|
+
Lint/RedundantWithObject:
|
525
|
+
Description: Checks for redundant `with_object`.
|
526
|
+
Enabled: true
|
527
|
+
|
528
|
+
Lint/RegexpAsCondition:
|
529
|
+
Description: Do not use regexp literal as a condition. The regexp literal matches `$_` implicitly.
|
530
|
+
Enabled: true
|
531
|
+
|
532
|
+
Lint/RequireParentheses:
|
533
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
534
|
+
Enabled: true
|
535
|
+
|
536
|
+
Lint/RescueException:
|
537
|
+
Description: Avoid rescuing the Exception class.
|
538
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
539
|
+
Enabled: true
|
540
|
+
|
541
|
+
Lint/RescueType:
|
542
|
+
Description: Avoid rescuing from non constants that could result in a `TypeError`.
|
543
|
+
Enabled: true
|
544
|
+
|
545
|
+
Lint/SafeNavigationChain:
|
546
|
+
Description: Do not chain ordinary method call after safe navigation operator.
|
547
|
+
Enabled: true
|
548
|
+
|
549
|
+
Lint/ScriptPermission:
|
550
|
+
Description: Grant script file execute permission.
|
551
|
+
Enabled: true
|
552
|
+
|
553
|
+
Lint/ShadowedException:
|
554
|
+
Description: Avoid rescuing a higher level exception before a lower level exception.
|
555
|
+
Enabled: true
|
556
|
+
|
557
|
+
Lint/ShadowingOuterLocalVariable:
|
558
|
+
Description: Do not use the same name as outer local variable for block arguments or block local variables.
|
559
|
+
Enabled: true
|
560
|
+
|
561
|
+
Lint/StringConversionInInterpolation:
|
562
|
+
Description: Checks for Object#to_s usage in string interpolation.
|
563
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
564
|
+
Enabled: true
|
565
|
+
|
566
|
+
Lint/UnderscorePrefixedVariableName:
|
567
|
+
Description: Do not use prefix `_` for a variable that is used.
|
568
|
+
Enabled: true
|
569
|
+
|
570
|
+
Lint/UnifiedInteger:
|
571
|
+
Description: Use Integer instead of Fixnum or Bignum
|
572
|
+
Enabled: true
|
573
|
+
|
574
|
+
Lint/UnneededRequireStatement:
|
575
|
+
Description: Checks for unnecessary `require` statement.
|
576
|
+
Enabled: true
|
577
|
+
|
578
|
+
Lint/UnneededSplatExpansion:
|
579
|
+
Description: Checks for splat unnecessarily being called on literals
|
580
|
+
Enabled: true
|
581
|
+
|
582
|
+
Lint/UnusedBlockArgument:
|
583
|
+
Description: Checks for unused block arguments.
|
584
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
585
|
+
Enabled: true
|
586
|
+
|
587
|
+
Lint/UnusedMethodArgument:
|
588
|
+
Description: Checks for unused method arguments.
|
589
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
590
|
+
Enabled: true
|
591
|
+
|
592
|
+
Lint/UnreachableCode:
|
593
|
+
Description: Unreachable code.
|
594
|
+
Enabled: true
|
595
|
+
|
596
|
+
Lint/UriEscapeUnescape:
|
597
|
+
Description: '`URI.escape` method is obsolete and should not be used. Instead, use `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending on your specific use case. Also `URI.unescape` method is obsolete and should not be used. Instead, use `CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component` depending on your specific use case.'
|
598
|
+
Enabled: true
|
599
|
+
|
600
|
+
Lint/UriRegexp:
|
601
|
+
Description: Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.
|
602
|
+
Enabled: true
|
603
|
+
|
604
|
+
Lint/UselessAccessModifier:
|
605
|
+
Description: Checks for useless access modifiers.
|
606
|
+
Enabled: true
|
607
|
+
ContextCreatingMethods: []
|
608
|
+
MethodCreatingMethods: []
|
609
|
+
|
610
|
+
Lint/UselessAssignment:
|
611
|
+
Description: Checks for useless assignment to a local variable.
|
612
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
613
|
+
Enabled: true
|
614
|
+
|
615
|
+
Lint/UselessComparison:
|
616
|
+
Description: Checks for comparison of something with itself.
|
617
|
+
Enabled: true
|
618
|
+
|
619
|
+
Lint/UselessElseWithoutRescue:
|
620
|
+
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
621
|
+
Enabled: true
|
622
|
+
|
623
|
+
Lint/ReturnInVoidContext:
|
624
|
+
Description: Checks for return in void context.
|
625
|
+
Enabled: true
|
626
|
+
|
627
|
+
Lint/UselessSetterCall:
|
628
|
+
Description: Checks for useless setter call to a local variable.
|
629
|
+
Enabled: true
|
630
|
+
|
631
|
+
Lint/Void:
|
632
|
+
Description: Possible use of operator/literal/variable in void context.
|
633
|
+
Enabled: true
|
634
|
+
|
635
|
+
# Department Metrics
|
636
|
+
Metrics/AbcSize:
|
637
|
+
Description: A calculated magnitude based on number of assignments, branches, and conditions.
|
638
|
+
Reference: http://c2.com/cgi/wiki?AbcMetric
|
639
|
+
Enabled: true
|
640
|
+
Max: 15
|
641
|
+
|
642
|
+
Metrics/BlockLength:
|
643
|
+
Description: Avoid long blocks with many lines.
|
644
|
+
Enabled: true
|
645
|
+
Exclude:
|
646
|
+
- Rakefile
|
647
|
+
- "**/*.rake"
|
648
|
+
- spec/**/*.rb
|
649
|
+
- 'config/routes.rb'
|
650
|
+
- 'config/environments/*.rb'
|
651
|
+
|
652
|
+
Metrics/BlockNesting:
|
653
|
+
Description: Avoid excessive block nesting
|
654
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
655
|
+
Enabled: true
|
656
|
+
Max: 4
|
657
|
+
|
658
|
+
Metrics/ClassLength:
|
659
|
+
Description: Avoid classes longer than 100 lines of code.
|
660
|
+
Enabled: true
|
661
|
+
Max: 100
|
662
|
+
|
663
|
+
Metrics/CyclomaticComplexity:
|
664
|
+
Description: A complexity metric that is strongly correlated to the number of test cases needed to validate a method.
|
665
|
+
Enabled: true
|
666
|
+
|
667
|
+
Metrics/LineLength:
|
668
|
+
Description: Limit lines to 80 characters.
|
669
|
+
StyleGuide: '#80-character-limits'
|
670
|
+
Enabled: true
|
671
|
+
Exclude:
|
672
|
+
- 'db/**/*'
|
673
|
+
|
674
|
+
Metrics/MethodLength:
|
675
|
+
Description: Avoid methods longer than 10 lines of code.
|
676
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
677
|
+
Enabled: true
|
678
|
+
Max: 10
|
679
|
+
Exclude:
|
680
|
+
- 'db/**/*'
|
681
|
+
|
682
|
+
Metrics/ModuleLength:
|
683
|
+
Description: Avoid modules longer than 100 lines of code.
|
684
|
+
Enabled: true
|
685
|
+
Max: 100
|
686
|
+
|
687
|
+
Metrics/ParameterLists:
|
688
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
689
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
690
|
+
Enabled: false
|
691
|
+
|
692
|
+
Metrics/PerceivedComplexity:
|
693
|
+
Description: A complexity metric geared towards measuring complexity for a human reader.
|
694
|
+
Enabled: true
|
695
|
+
|
696
|
+
# Department Naming
|
697
|
+
Naming/AccessorMethodName:
|
698
|
+
Description: Check the naming of accessor methods for get_/set_.
|
699
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names
|
700
|
+
Enabled: false
|
701
|
+
|
702
|
+
Naming/AsciiIdentifiers:
|
703
|
+
Description: Use only ascii symbols in identifiers.
|
704
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
705
|
+
Enabled: false
|
706
|
+
|
707
|
+
Naming/ClassAndModuleCamelCase:
|
708
|
+
Description: Use CamelCase for classes and modules.
|
709
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
710
|
+
Enabled: true
|
711
|
+
|
712
|
+
Naming/ConstantName:
|
713
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
714
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
715
|
+
Enabled: true
|
716
|
+
|
717
|
+
Naming/FileName:
|
718
|
+
Description: Use snake_case for source file names.
|
719
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
720
|
+
Enabled: true
|
721
|
+
|
722
|
+
Naming/HeredocDelimiterCase:
|
723
|
+
Description: Use configured case for heredoc delimiters.
|
724
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#heredoc-delimiters
|
725
|
+
Enabled: true
|
726
|
+
|
727
|
+
Naming/HeredocDelimiterNaming:
|
728
|
+
Description: Use descriptive heredoc delimiters.
|
729
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#heredoc-delimiters
|
730
|
+
Enabled: true
|
731
|
+
|
732
|
+
Naming/MethodName:
|
733
|
+
Description: Use the configured style when naming methods.
|
734
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
735
|
+
Enabled: false
|
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: true
|
741
|
+
|
742
|
+
Naming/BinaryOperatorParameterName:
|
743
|
+
Description: When defining binary operators, name the argument other.
|
744
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
745
|
+
Enabled: true
|
746
|
+
|
747
|
+
Naming/VariableName:
|
748
|
+
Description: Use the configured style when naming variables.
|
749
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
750
|
+
Enabled: true
|
751
|
+
|
752
|
+
Naming/VariableNumber:
|
753
|
+
Description: Use the configured style when numbering variables.
|
754
|
+
Enabled: true
|
755
|
+
|
756
|
+
Naming/MemoizedInstanceVariableName:
|
757
|
+
Enabled: true
|
758
|
+
Exclude:
|
759
|
+
- app/controllers/*.rb
|
760
|
+
# Department Performance
|
761
|
+
Performance/Caller:
|
762
|
+
Description: Use `caller(n..n)` instead of `caller`.
|
763
|
+
Enabled: true
|
764
|
+
|
765
|
+
Performance/Casecmp:
|
766
|
+
Description: Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`..
|
767
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code
|
768
|
+
Enabled: true
|
769
|
+
|
770
|
+
Performance/CaseWhenSplat:
|
771
|
+
Description: Place `when` conditions that use splat at the end of the list of `when` branches.
|
772
|
+
Enabled: true
|
773
|
+
|
774
|
+
Performance/Count:
|
775
|
+
Description: Use `count` instead of `select...size`, `reject...size`, `select...count`, `reject...count`, `select...length`, and `reject...length`.
|
776
|
+
SafeAutoCorrect: true
|
777
|
+
Enabled: true
|
778
|
+
|
779
|
+
Performance/Detect:
|
780
|
+
Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`, and `find_all.last`.
|
781
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
782
|
+
SafeAutoCorrect: true
|
783
|
+
Enabled: true
|
784
|
+
|
785
|
+
Performance/DoubleStartEndWith:
|
786
|
+
Description: Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
|
787
|
+
Enabled: true
|
788
|
+
|
789
|
+
Performance/EndWith:
|
790
|
+
Description: Use `end_with?` instead of a regex match anchored to the end of a string.
|
791
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
|
792
|
+
AutoCorrect: false
|
793
|
+
Enabled: true
|
794
|
+
|
795
|
+
Performance/FixedSize:
|
796
|
+
Description: Do not compute the size of statically sized objects except in constants
|
797
|
+
Enabled: true
|
798
|
+
|
799
|
+
Performance/FlatMap:
|
800
|
+
Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)` or `Enumberable#collect..Array#flatten(1)`
|
801
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
|
802
|
+
Enabled: true
|
803
|
+
EnabledForFlattenWithoutParams: false
|
804
|
+
|
805
|
+
Performance/RangeInclude:
|
806
|
+
Description: Use `Range#cover?` instead of `Range#include?`.
|
807
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code
|
808
|
+
Enabled: true
|
809
|
+
|
810
|
+
Performance/RedundantBlockCall:
|
811
|
+
Description: Use `yield` instead of `block.call`.
|
812
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code
|
813
|
+
Enabled: true
|
814
|
+
|
815
|
+
Performance/RedundantMatch:
|
816
|
+
Description: Use `=~` instead of `String#match` or `Regexp#match` in a context where the returned `MatchData` is not needed.
|
817
|
+
Enabled: true
|
818
|
+
|
819
|
+
Performance/RedundantMerge:
|
820
|
+
Description: Use Hash#[]=, rather than Hash#merge! with a single key-value pair.
|
821
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code
|
822
|
+
Enabled: true
|
823
|
+
|
824
|
+
Style/RedundantSortBy:
|
825
|
+
Description: Use `sort` instead of `sort_by { |x| x }`.
|
826
|
+
Enabled: true
|
827
|
+
|
828
|
+
Performance/RegexpMatch:
|
829
|
+
Description: Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, `Regexp#===`, or `=~` when `MatchData` is not used.
|
830
|
+
Enabled: true
|
831
|
+
|
832
|
+
Performance/ReverseEach:
|
833
|
+
Description: Use `reverse_each` instead of `reverse.each`.
|
834
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
|
835
|
+
Enabled: true
|
836
|
+
|
837
|
+
Style/Sample:
|
838
|
+
Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Integer]`.
|
839
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
|
840
|
+
Enabled: true
|
841
|
+
|
842
|
+
Performance/Size:
|
843
|
+
Description: Use `size` instead of `count` for counting the number of elements in `Array` and `Hash`.
|
844
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
|
845
|
+
Enabled: true
|
846
|
+
|
847
|
+
Performance/CompareWithBlock:
|
848
|
+
Description: Use `sort_by(&:foo)` instead of `sort { |a, b| a.foo <=> b.foo }`.
|
849
|
+
Enabled: true
|
850
|
+
|
851
|
+
Performance/StartWith:
|
852
|
+
Description: Use `start_with?` instead of a regex match anchored to the beginning of a string.
|
853
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
|
854
|
+
AutoCorrect: false
|
855
|
+
Enabled: true
|
856
|
+
|
857
|
+
Performance/StringReplacement:
|
858
|
+
Description: Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.
|
859
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
|
860
|
+
Enabled: true
|
861
|
+
|
862
|
+
Performance/TimesMap:
|
863
|
+
Description: Checks for .times.map calls.
|
864
|
+
AutoCorrect: false
|
865
|
+
Enabled: true
|
866
|
+
|
867
|
+
Performance/UnfreezeString:
|
868
|
+
Description: Use unary plus to get an unfrozen string literal.
|
869
|
+
Enabled: true
|
870
|
+
|
871
|
+
Performance/UriDefaultParser:
|
872
|
+
Description: Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.
|
873
|
+
Enabled: true
|
874
|
+
|
875
|
+
# Department Security
|
876
|
+
Security/Eval:
|
877
|
+
Description: The use of eval represents a serious security risk.
|
878
|
+
Enabled: true
|
879
|
+
|
880
|
+
Security/JSONLoad:
|
881
|
+
Description: Prefer usage of `JSON.parse` over `JSON.load` due to potential security issues. See reference for more information.
|
882
|
+
Reference: http://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load
|
883
|
+
Enabled: true
|
884
|
+
AutoCorrect: false
|
885
|
+
|
886
|
+
Security/MarshalLoad:
|
887
|
+
Description: Avoid using of `Marshal.load` or `Marshal.restore` due to potential security issues. See reference for more information.
|
888
|
+
Reference: http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations
|
889
|
+
Enabled: true
|
890
|
+
|
891
|
+
Security/YAMLLoad:
|
892
|
+
Description: Prefer usage of `YAML.safe_load` over `YAML.load` due to potential security issues. See reference for more information.
|
893
|
+
Reference: https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security
|
894
|
+
Enabled: true
|
895
|
+
|
896
|
+
Security/Open:
|
897
|
+
Exclude:
|
898
|
+
- db/migrate/*.rb
|
899
|
+
# Department Style
|
900
|
+
Style/Alias:
|
901
|
+
Description: Use alias instead of alias_method.
|
902
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
903
|
+
Enabled: false
|
904
|
+
|
905
|
+
Style/AndOr:
|
906
|
+
Description: Use &&/|| instead of and/or.
|
907
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
908
|
+
Enabled: true
|
909
|
+
|
910
|
+
Style/ArrayJoin:
|
911
|
+
Description: Use Array#join instead of Array#*.
|
912
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join'
|
913
|
+
Enabled: false
|
914
|
+
|
915
|
+
Style/AsciiComments:
|
916
|
+
Description: Use only ascii symbols in comments.
|
917
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
918
|
+
Enabled: false
|
919
|
+
|
920
|
+
Style/Attr:
|
921
|
+
Description: Checks for uses of Module#attr.
|
922
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
923
|
+
Enabled: true
|
924
|
+
|
925
|
+
Style/AutoResourceCleanup:
|
926
|
+
Description: Suggests the usage of an auto resource cleanup version of a method (if available).
|
927
|
+
Enabled: false
|
928
|
+
|
929
|
+
Style/BeginBlock:
|
930
|
+
Description: Avoid the use of BEGIN blocks.
|
931
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
932
|
+
Enabled: true
|
933
|
+
|
934
|
+
Style/BarePercentLiterals:
|
935
|
+
Description: Checks if usage of %() or %Q() matches configuration.
|
936
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
937
|
+
Enabled: true
|
938
|
+
|
939
|
+
Style/BlockComments:
|
940
|
+
Description: Do not use block comments.
|
941
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
942
|
+
Enabled: false
|
943
|
+
|
944
|
+
Style/BlockDelimiters:
|
945
|
+
Description: Avoid using {...} for multi-line blocks (multiline chaining is always ugly). Prefer {...} over do...end for single-line blocks.
|
946
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
947
|
+
Enabled: true
|
948
|
+
|
949
|
+
Style/BracesAroundHashParameters:
|
950
|
+
Description: Enforce braces style around hash parameters.
|
951
|
+
Enabled: false
|
952
|
+
|
953
|
+
Style/CaseEquality:
|
954
|
+
Description: Avoid explicit use of the case equality operator(===).
|
955
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
956
|
+
Enabled: false
|
957
|
+
|
958
|
+
Style/CharacterLiteral:
|
959
|
+
Description: Checks for uses of character literals.
|
960
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
961
|
+
Enabled: false
|
962
|
+
|
963
|
+
Style/ClassAndModuleChildren:
|
964
|
+
Description: Checks style of children classes and modules.
|
965
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#namespace-definition
|
966
|
+
Enabled: false
|
967
|
+
|
968
|
+
Style/ClassCheck:
|
969
|
+
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
970
|
+
Enabled: true
|
971
|
+
|
972
|
+
Style/ClassMethods:
|
973
|
+
Description: Use self when defining module/class methods.
|
974
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-class-methods
|
975
|
+
Enabled: false
|
976
|
+
|
977
|
+
Style/ClassVars:
|
978
|
+
Description: Avoid the use of class variables.
|
979
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
980
|
+
Enabled: false
|
981
|
+
|
982
|
+
Style/CollectionMethods:
|
983
|
+
Description: Preferred collection methods.
|
984
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
985
|
+
Enabled: false
|
986
|
+
|
987
|
+
Style/ColonMethodCall:
|
988
|
+
Description: 'Do not use :: for method call.'
|
989
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
990
|
+
Enabled: true
|
991
|
+
|
992
|
+
Style/CommandLiteral:
|
993
|
+
Description: Use `` or %x around command literals.
|
994
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
|
995
|
+
Enabled: false
|
996
|
+
|
997
|
+
Style/CommentAnnotation:
|
998
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
999
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
1000
|
+
Enabled: false
|
1001
|
+
|
1002
|
+
Style/CommentedKeyword:
|
1003
|
+
Description: Do not place comments on the same line as certain keywords.
|
1004
|
+
Enabled: false
|
1005
|
+
|
1006
|
+
Style/ConditionalAssignment:
|
1007
|
+
Description: Use the return value of `if` and `case` statements for assignment to a variable and variable comparison instead of assigning that variable inside of each branch.
|
1008
|
+
Enabled: true
|
1009
|
+
|
1010
|
+
Style/Copyright:
|
1011
|
+
Description: Include a copyright notice in each file before any code.
|
1012
|
+
Enabled: false
|
1013
|
+
|
1014
|
+
Style/DateTime:
|
1015
|
+
Description: Use Date or Time over DateTime.
|
1016
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#date--time
|
1017
|
+
Enabled: false
|
1018
|
+
|
1019
|
+
Style/DefWithParentheses:
|
1020
|
+
Description: Use def with parentheses when there are arguments.
|
1021
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
1022
|
+
Enabled: true
|
1023
|
+
|
1024
|
+
Style/Dir:
|
1025
|
+
Description: Use the `__dir__` method to retrieve the canonicalized absolute path to the current file.
|
1026
|
+
Enabled: true
|
1027
|
+
|
1028
|
+
Style/Documentation:
|
1029
|
+
Description: Document classes and non-namespace modules.
|
1030
|
+
Enabled: false
|
1031
|
+
Exclude:
|
1032
|
+
- 'spec/**/*'
|
1033
|
+
- 'test/**/*'
|
1034
|
+
|
1035
|
+
Style/DocumentationMethod:
|
1036
|
+
Description: Public methods.
|
1037
|
+
Enabled: false
|
1038
|
+
Exclude:
|
1039
|
+
- 'spec/**/*'
|
1040
|
+
- 'test/**/*'
|
1041
|
+
|
1042
|
+
Style/DoubleNegation:
|
1043
|
+
Description: Checks for uses of double negation (!!).
|
1044
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
1045
|
+
Enabled: true
|
1046
|
+
|
1047
|
+
Style/EachForSimpleLoop:
|
1048
|
+
Description: Use `Integer#times` for a simple loop which iterates a fixed number of times.
|
1049
|
+
Enabled: true
|
1050
|
+
|
1051
|
+
Style/EachWithObject:
|
1052
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
1053
|
+
Enabled: false
|
1054
|
+
|
1055
|
+
Style/EmptyElse:
|
1056
|
+
Description: Avoid empty else-clauses.
|
1057
|
+
Enabled: true
|
1058
|
+
|
1059
|
+
Style/EmptyCaseCondition:
|
1060
|
+
Description: Avoid empty condition in case statements.
|
1061
|
+
Enabled: true
|
1062
|
+
|
1063
|
+
Style/EmptyLiteral:
|
1064
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
1065
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
1066
|
+
Enabled: false
|
1067
|
+
|
1068
|
+
Style/EmptyMethod:
|
1069
|
+
Description: Checks the formatting of empty method definitions.
|
1070
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
1071
|
+
Enabled: false
|
1072
|
+
|
1073
|
+
Style/EndBlock:
|
1074
|
+
Description: Avoid the use of END blocks.
|
1075
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
1076
|
+
Enabled: false
|
1077
|
+
|
1078
|
+
Style/Encoding:
|
1079
|
+
Description: Use UTF-8 as the source file encoding.
|
1080
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
1081
|
+
Enabled: true
|
1082
|
+
|
1083
|
+
Style/EvenOdd:
|
1084
|
+
Description: Favor the use of Integer#even? && Integer#odd?
|
1085
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
1086
|
+
Enabled: true
|
1087
|
+
|
1088
|
+
Style/FrozenStringLiteralComment:
|
1089
|
+
Description: Add the frozen_string_literal comment to the top of files to help transition from Ruby 2.3.0 to Ruby 3.0.
|
1090
|
+
Enabled: true
|
1091
|
+
|
1092
|
+
Lint/FlipFlop:
|
1093
|
+
Description: Checks for flip flops
|
1094
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
1095
|
+
Enabled: true
|
1096
|
+
|
1097
|
+
Style/For:
|
1098
|
+
Description: Checks use of for or each in multiline loops.
|
1099
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
1100
|
+
Enabled: true
|
1101
|
+
|
1102
|
+
Style/FormatString:
|
1103
|
+
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
1104
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
1105
|
+
Enabled: false
|
1106
|
+
|
1107
|
+
Style/FormatStringToken:
|
1108
|
+
Description: Use a consistent style for format string tokens.
|
1109
|
+
Enabled: true
|
1110
|
+
|
1111
|
+
Style/GlobalVars:
|
1112
|
+
Description: Do not introduce global variables.
|
1113
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
1114
|
+
Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html
|
1115
|
+
Enabled: true
|
1116
|
+
|
1117
|
+
Style/GuardClause:
|
1118
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
1119
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
1120
|
+
Enabled: true
|
1121
|
+
|
1122
|
+
Style/HashSyntax:
|
1123
|
+
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }.'
|
1124
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
1125
|
+
Enabled: true
|
1126
|
+
|
1127
|
+
Style/IfInsideElse:
|
1128
|
+
Description: Finds if nodes inside else, which can be converted to elsif.
|
1129
|
+
Enabled: true
|
1130
|
+
|
1131
|
+
Style/IfUnlessModifier:
|
1132
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
1133
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
1134
|
+
Enabled: true
|
1135
|
+
|
1136
|
+
Style/IfUnlessModifierOfIfUnless:
|
1137
|
+
Description: Avoid modifier if/unless usage on conditionals.
|
1138
|
+
Enabled: true
|
1139
|
+
|
1140
|
+
Style/IfWithSemicolon:
|
1141
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
1142
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
1143
|
+
Enabled: true
|
1144
|
+
|
1145
|
+
Style/IdenticalConditionalBranches:
|
1146
|
+
Description: Checks that conditional statements do not have an identical line at the end of each branch, which can validly be moved out of the conditional.
|
1147
|
+
Enabled: true
|
1148
|
+
|
1149
|
+
Style/InfiniteLoop:
|
1150
|
+
Description: Use Kernel#loop for infinite loops.
|
1151
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
1152
|
+
Enabled: true
|
1153
|
+
|
1154
|
+
Style/InlineComment:
|
1155
|
+
Description: Avoid trailing inline comments.
|
1156
|
+
Enabled: false
|
1157
|
+
|
1158
|
+
Style/InverseMethods:
|
1159
|
+
Description: Use the inverse method instead of `!.method` if an inverse method is defined.
|
1160
|
+
Enabled: true
|
1161
|
+
|
1162
|
+
Style/ImplicitRuntimeError:
|
1163
|
+
Description: Use `raise` or `fail` with an explicit exception class and message, rather than just a message.
|
1164
|
+
Enabled: false
|
1165
|
+
|
1166
|
+
Style/Lambda:
|
1167
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
1168
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
1169
|
+
Enabled: true
|
1170
|
+
|
1171
|
+
Style/LambdaCall:
|
1172
|
+
Description: Use lambda.call(...) instead of lambda.(...).
|
1173
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
1174
|
+
Enabled: false
|
1175
|
+
|
1176
|
+
Style/LineEndConcatenation:
|
1177
|
+
Description: Use \ instead of + or << to concatenate two string literals at line end.
|
1178
|
+
Enabled: true
|
1179
|
+
|
1180
|
+
Style/MethodCallWithoutArgsParentheses:
|
1181
|
+
Description: Do not use parentheses for method calls with no arguments.
|
1182
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
1183
|
+
Enabled: true
|
1184
|
+
|
1185
|
+
Style/MethodCallWithArgsParentheses:
|
1186
|
+
Description: Use parentheses for method calls with arguments.
|
1187
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
1188
|
+
Enabled: false
|
1189
|
+
|
1190
|
+
Style/MethodCalledOnDoEndBlock:
|
1191
|
+
Description: Avoid chaining a method call on a do...end block.
|
1192
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
1193
|
+
Enabled: false
|
1194
|
+
|
1195
|
+
Style/MethodDefParentheses:
|
1196
|
+
Description: Checks if the method definitions have or don't have parentheses.
|
1197
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
1198
|
+
Enabled: true
|
1199
|
+
|
1200
|
+
Style/MethodMissingSuper:
|
1201
|
+
Enabled: true
|
1202
|
+
|
1203
|
+
Style/MissingRespondToMissing:
|
1204
|
+
Enabled: true
|
1205
|
+
|
1206
|
+
Style/MinMax:
|
1207
|
+
Description: Use `Enumerable#minmax` instead of `Enumerable#min` and `Enumerable#max` in conjunction.'
|
1208
|
+
Enabled: true
|
1209
|
+
|
1210
|
+
Style/MissingElse:
|
1211
|
+
Description: Require if/case expressions to have an else branches. If enabled, it is recommended that Style/UnlessElse and Style/EmptyElse be enabled. This will conflict with Style/EmptyElse if Style/EmptyElse is configured to style "both"
|
1212
|
+
Enabled: false
|
1213
|
+
EnforcedStyle: both
|
1214
|
+
SupportedStyles:
|
1215
|
+
- if
|
1216
|
+
- case
|
1217
|
+
- both
|
1218
|
+
|
1219
|
+
Style/MixinGrouping:
|
1220
|
+
Description: Checks for grouping of mixins in `class` and `module` bodies.
|
1221
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#mixin-grouping
|
1222
|
+
Enabled: true
|
1223
|
+
|
1224
|
+
Style/ModuleFunction:
|
1225
|
+
Description: Checks for usage of `extend self` in modules.
|
1226
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
1227
|
+
Enabled: true
|
1228
|
+
|
1229
|
+
Style/MultilineBlockChain:
|
1230
|
+
Description: Avoid multi-line chains of blocks.
|
1231
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
1232
|
+
Enabled: false
|
1233
|
+
|
1234
|
+
Style/MultilineIfThen:
|
1235
|
+
Description: Do not use then for multi-line if/unless.
|
1236
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
1237
|
+
Enabled: true
|
1238
|
+
|
1239
|
+
Style/MultilineIfModifier:
|
1240
|
+
Description: Only use if/unless modifiers on single line statements.
|
1241
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-if-modifiers
|
1242
|
+
Enabled: true
|
1243
|
+
|
1244
|
+
Style/MultilineMemoization:
|
1245
|
+
Description: Wrap multiline memoizations in a `begin` and `end` block.
|
1246
|
+
Enabled: true
|
1247
|
+
|
1248
|
+
Style/MultilineTernaryOperator:
|
1249
|
+
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
1250
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
1251
|
+
Enabled: true
|
1252
|
+
|
1253
|
+
Style/MultipleComparison:
|
1254
|
+
Description: Avoid comparing a variable with multiple items in a conditional, use Array#include? instead.
|
1255
|
+
Enabled: true
|
1256
|
+
|
1257
|
+
Style/MutableConstant:
|
1258
|
+
Description: Do not assign mutable objects to constants.
|
1259
|
+
Enabled: true
|
1260
|
+
|
1261
|
+
Style/NegatedIf:
|
1262
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
1263
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
1264
|
+
Enabled: true
|
1265
|
+
|
1266
|
+
Style/NegatedWhile:
|
1267
|
+
Description: Favor until over while for negative conditions.
|
1268
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
1269
|
+
Enabled: true
|
1270
|
+
|
1271
|
+
Style/NestedModifier:
|
1272
|
+
Description: Avoid using nested modifiers.
|
1273
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers
|
1274
|
+
Enabled: true
|
1275
|
+
|
1276
|
+
Style/NestedParenthesizedCalls:
|
1277
|
+
Description: Parenthesize method calls which are nested inside the argument list of another parenthesized method call.
|
1278
|
+
Enabled: true
|
1279
|
+
|
1280
|
+
Style/NestedTernaryOperator:
|
1281
|
+
Description: Use one expression per branch in a ternary operator.
|
1282
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
1283
|
+
Enabled: true
|
1284
|
+
|
1285
|
+
Style/Next:
|
1286
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
1287
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
1288
|
+
Enabled: true
|
1289
|
+
|
1290
|
+
Style/NilComparison:
|
1291
|
+
Description: 'Prefer x.nil? to x == nil.'
|
1292
|
+
StyleGuide: '#predicate-methods'
|
1293
|
+
Enabled: true
|
1294
|
+
|
1295
|
+
Style/NonNilCheck:
|
1296
|
+
Description: Checks for redundant nil checks.
|
1297
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
1298
|
+
Enabled: true
|
1299
|
+
|
1300
|
+
Style/Not:
|
1301
|
+
Description: Use ! instead of not.
|
1302
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
1303
|
+
Enabled: true
|
1304
|
+
|
1305
|
+
Style/NumericLiterals:
|
1306
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
1307
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
1308
|
+
Enabled: true
|
1309
|
+
|
1310
|
+
Style/NumericLiteralPrefix:
|
1311
|
+
Description: Use smallcase prefixes for numeric literals.
|
1312
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#numeric-literal-prefixes
|
1313
|
+
Enabled: true
|
1314
|
+
|
1315
|
+
Style/NumericPredicate:
|
1316
|
+
Description: Checks for the use of predicate- or comparison methods for numeric comparisons.
|
1317
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
1318
|
+
AutoCorrect: false
|
1319
|
+
Enabled: true
|
1320
|
+
|
1321
|
+
Style/OneLineConditional:
|
1322
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
1323
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
1324
|
+
Enabled: false
|
1325
|
+
|
1326
|
+
Style/OptionalArguments:
|
1327
|
+
Description: Checks for optional arguments that do not appear at the end of the argument list
|
1328
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#optional-arguments
|
1329
|
+
Enabled: false
|
1330
|
+
|
1331
|
+
Style/OptionHash:
|
1332
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
1333
|
+
Enabled: false
|
1334
|
+
|
1335
|
+
Style/OrAssignment:
|
1336
|
+
Description: Recommend usage of double pipe equals (||=) where applicable.
|
1337
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-pipe-for-uninit
|
1338
|
+
Enabled: true
|
1339
|
+
|
1340
|
+
Style/ParallelAssignment:
|
1341
|
+
Description: Check for simple usages of parallel assignment. It will only warn when the number of variables matches on both sides of the assignment.
|
1342
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parallel-assignment
|
1343
|
+
Enabled: false
|
1344
|
+
|
1345
|
+
Style/ParenthesesAroundCondition:
|
1346
|
+
Description: Don't use parentheses around the condition of an if/unless/while.
|
1347
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-around-condition
|
1348
|
+
Enabled: true
|
1349
|
+
|
1350
|
+
Style/PercentLiteralDelimiters:
|
1351
|
+
Description: Use `%`-literal delimiters consistently
|
1352
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
1353
|
+
Enabled: true
|
1354
|
+
PreferredDelimiters:
|
1355
|
+
default: ()
|
1356
|
+
'%i': '()'
|
1357
|
+
'%I': '()'
|
1358
|
+
'%r': '{}'
|
1359
|
+
'%w': '()'
|
1360
|
+
'%W': '()'
|
1361
|
+
|
1362
|
+
Style/PercentQLiterals:
|
1363
|
+
Description: Checks if uses of %Q/%q match the configured preference.
|
1364
|
+
Enabled: true
|
1365
|
+
|
1366
|
+
Style/PerlBackrefs:
|
1367
|
+
Description: Avoid Perl-style regex back references.
|
1368
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
1369
|
+
Enabled: false
|
1370
|
+
|
1371
|
+
Style/PreferredHashMethods:
|
1372
|
+
Description: Checks use of `has_key?` and `has_value?` Hash methods.
|
1373
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
1374
|
+
Enabled: true
|
1375
|
+
|
1376
|
+
Style/Proc:
|
1377
|
+
Description: Use proc instead of Proc.new.
|
1378
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
1379
|
+
Enabled: true
|
1380
|
+
|
1381
|
+
Style/RaiseArgs:
|
1382
|
+
Description: Checks the arguments passed to raise/fail.
|
1383
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
1384
|
+
Enabled: false
|
1385
|
+
|
1386
|
+
Style/RedundantBegin:
|
1387
|
+
Description: Don't use begin blocks when they are not needed.
|
1388
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
1389
|
+
Enabled: true
|
1390
|
+
|
1391
|
+
Style/RedundantConditional:
|
1392
|
+
Description: Don't return true/false from a conditional.
|
1393
|
+
Enabled: true
|
1394
|
+
|
1395
|
+
Style/RedundantException:
|
1396
|
+
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
1397
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
1398
|
+
Enabled: true
|
1399
|
+
|
1400
|
+
Style/RedundantFreeze:
|
1401
|
+
Description: Checks usages of Object#freeze on immutable objects.
|
1402
|
+
Enabled: true
|
1403
|
+
|
1404
|
+
Style/RedundantParentheses:
|
1405
|
+
Description: Checks for parentheses that seem not to serve any purpose.
|
1406
|
+
Enabled: true
|
1407
|
+
|
1408
|
+
Style/RedundantReturn:
|
1409
|
+
Description: Don't use return where it's not required.
|
1410
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
1411
|
+
Enabled: true
|
1412
|
+
|
1413
|
+
Style/RedundantSelf:
|
1414
|
+
Description: Don't use self where it's not needed.
|
1415
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
1416
|
+
Enabled: true
|
1417
|
+
|
1418
|
+
Style/RegexpLiteral:
|
1419
|
+
Description: Use / or %r around regular expressions.
|
1420
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
1421
|
+
Enabled: false
|
1422
|
+
|
1423
|
+
Style/RescueModifier:
|
1424
|
+
Description: Avoid using rescue in its modifier form.
|
1425
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
1426
|
+
Enabled: false
|
1427
|
+
|
1428
|
+
Style/RescueStandardError:
|
1429
|
+
Description: Avoid rescuing without specifying an error class.
|
1430
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
1431
|
+
Enabled: true
|
1432
|
+
|
1433
|
+
Style/ReturnNil:
|
1434
|
+
Description: Use return instead of return nil.
|
1435
|
+
Enabled: false
|
1436
|
+
|
1437
|
+
Style/SafeNavigation:
|
1438
|
+
Description: This cop transforms usages of a method call safeguarded by a check for the existance of the object to safe navigation (`&.`).
|
1439
|
+
Enabled: true
|
1440
|
+
|
1441
|
+
Style/SelfAssignment:
|
1442
|
+
Description: Checks for places where self-assignment shorthand should have been used.
|
1443
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
1444
|
+
Enabled: true
|
1445
|
+
|
1446
|
+
Style/Semicolon:
|
1447
|
+
Description: Don't use semicolons to terminate expressions.
|
1448
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
1449
|
+
Enabled: true
|
1450
|
+
|
1451
|
+
Style/Send:
|
1452
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.
|
1453
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
1454
|
+
Enabled: false
|
1455
|
+
|
1456
|
+
Style/SignalException:
|
1457
|
+
Description: Checks for proper usage of fail and raise.
|
1458
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail
|
1459
|
+
Enabled: true
|
1460
|
+
|
1461
|
+
Style/SingleLineBlockParams:
|
1462
|
+
Description: Enforces the names of some block params.
|
1463
|
+
Enabled: false
|
1464
|
+
|
1465
|
+
Style/SingleLineMethods:
|
1466
|
+
Description: Avoid single-line methods.
|
1467
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
1468
|
+
Enabled: false
|
1469
|
+
|
1470
|
+
Style/SpecialGlobalVars:
|
1471
|
+
Description: Avoid Perl-style global variables.
|
1472
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
1473
|
+
Enabled: false
|
1474
|
+
|
1475
|
+
Style/StabbyLambdaParentheses:
|
1476
|
+
Description: Check for the usage of parentheses around stabby lambda arguments.
|
1477
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args
|
1478
|
+
Enabled: true
|
1479
|
+
|
1480
|
+
Style/StderrPuts:
|
1481
|
+
Description: Use `warn` instead of `$stderr.puts`.
|
1482
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#warn
|
1483
|
+
Enabled: true
|
1484
|
+
|
1485
|
+
Style/StringLiterals:
|
1486
|
+
Description: Checks if uses of quotes match the configured preference.
|
1487
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
1488
|
+
EnforcedStyle: double_quotes
|
1489
|
+
Enabled: true
|
1490
|
+
|
1491
|
+
Style/StringLiteralsInInterpolation:
|
1492
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings match the configured preference.
|
1493
|
+
Enabled: true
|
1494
|
+
|
1495
|
+
Style/StringMethods:
|
1496
|
+
Description: Checks if configured preferred methods are used over non-preferred.
|
1497
|
+
Enabled: false
|
1498
|
+
|
1499
|
+
Style/StructInheritance:
|
1500
|
+
Description: Checks for inheritance from Struct.new.
|
1501
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
1502
|
+
Enabled: false
|
1503
|
+
|
1504
|
+
Style/SymbolArray:
|
1505
|
+
Description: Use %i or %I for arrays of symbols.
|
1506
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
1507
|
+
Enabled: true
|
1508
|
+
|
1509
|
+
Style/SymbolLiteral:
|
1510
|
+
Description: Use plain symbols instead of string symbols when possible.
|
1511
|
+
Enabled: false
|
1512
|
+
|
1513
|
+
Style/SymbolProc:
|
1514
|
+
Description: Use symbols as procs instead of blocks when possible.
|
1515
|
+
Enabled: false
|
1516
|
+
|
1517
|
+
Style/TernaryParentheses:
|
1518
|
+
Description: Checks for use of parentheses around ternary conditions.
|
1519
|
+
Enabled: true
|
1520
|
+
|
1521
|
+
Style/MixinUsage:
|
1522
|
+
Description: Checks that `include`, `extend` and `prepend` exists at the top level.
|
1523
|
+
Enabled: true
|
1524
|
+
|
1525
|
+
Style/TrailingCommaInArguments:
|
1526
|
+
Description: Checks for trailing comma in argument lists.
|
1527
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
|
1528
|
+
Enabled: false
|
1529
|
+
|
1530
|
+
Style/TrailingCommaInArrayLiteral:
|
1531
|
+
Description: Checks for trailing comma in array and hash literals.'
|
1532
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
1533
|
+
Enabled: false
|
1534
|
+
|
1535
|
+
Style/TrailingCommaInHashLiteral:
|
1536
|
+
Description: Checks for trailing comma in array and hash literals.'
|
1537
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
1538
|
+
Enabled: false
|
1539
|
+
|
1540
|
+
Style/TrivialAccessors:
|
1541
|
+
Description: Prefer attr_* methods to trivial readers/writers.
|
1542
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
1543
|
+
Enabled: false
|
1544
|
+
|
1545
|
+
Style/UnlessElse:
|
1546
|
+
Description: Do not use unless with else. Rewrite these with the positive case first.
|
1547
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
1548
|
+
Enabled: true
|
1549
|
+
|
1550
|
+
Style/UnneededCapitalW:
|
1551
|
+
Description: Checks for %W when interpolation is not needed.
|
1552
|
+
Enabled: false
|
1553
|
+
|
1554
|
+
Style/UnneededInterpolation:
|
1555
|
+
Description: Checks for strings that are just an interpolated expression.
|
1556
|
+
Enabled: true
|
1557
|
+
|
1558
|
+
Style/UnneededPercentQ:
|
1559
|
+
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
1560
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
1561
|
+
Enabled: false
|
1562
|
+
|
1563
|
+
Style/TrailingUnderscoreVariable:
|
1564
|
+
Description: Checks for the usage of unneeded trailing underscores at the end of parallel variable assignment.
|
1565
|
+
AllowNamedUnderscoreVariables: true
|
1566
|
+
Enabled: false
|
1567
|
+
|
1568
|
+
Style/VariableInterpolation:
|
1569
|
+
Description: Don't interpolate global, instance and class variables directly in strings.
|
1570
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
1571
|
+
Enabled: true
|
1572
|
+
|
1573
|
+
Style/WhenThen:
|
1574
|
+
Description: Use when x then ... for one-line cases.
|
1575
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
1576
|
+
Enabled: true
|
1577
|
+
|
1578
|
+
Style/WhileUntilDo:
|
1579
|
+
Description: Checks for redundant do after while or until.
|
1580
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
1581
|
+
Enabled: true
|
1582
|
+
|
1583
|
+
Style/WhileUntilModifier:
|
1584
|
+
Description: Favor modifier while/until usage when you have a single-line body.
|
1585
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
1586
|
+
Enabled: true
|
1587
|
+
|
1588
|
+
Style/WordArray:
|
1589
|
+
Description: Use %w or %W for arrays of words.
|
1590
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
1591
|
+
Enabled: true
|
1592
|
+
|
1593
|
+
Style/YodaCondition:
|
1594
|
+
Description: Do not use literals as the first operand of a comparison.
|
1595
|
+
Reference: https://en.wikipedia.org/wiki/Yoda_conditions
|
1596
|
+
Enabled: true
|
1597
|
+
|
1598
|
+
Style/ZeroLengthPredicate:
|
1599
|
+
Description: Use #empty? when testing for objects of length 0.
|
1600
|
+
Enabled: true
|