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