rubocop-codeur 0.2.0 → 0.4.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 +4 -4
- data/.rubocop.yml +1 -0
- data/Gemfile.lock +2 -7
- data/README.md +13 -2
- data/default.yml +32 -4
- data/lib/rubocop/codeur/version.rb +1 -1
- data/lib/rubocop/cop/codeur/rails_app_patterns.rb +1 -1
- data/rubocop-codeur.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a56423208cd7dbf9fb560a4182d1dcc4797409152af850c6d39d9bb7657e4c88
|
4
|
+
data.tar.gz: 2a13447627e8a3d20c9bbb9ef8ce6b80d77009cc0f2217077d8ea23ad5d82468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02b24eb5c2f71d76ced69ab7b3b2ddb05e049ef4779f8716554f21f697441392311dcacfe04e360f5237e4dbfe37be4ab24134d22efedd45c12d7148f73c8a53
|
7
|
+
data.tar.gz: bc38e5651872d4f1957b696dd632cf9caf6cdebcf71c41efed66bba0e02a1f3013b5ca595c351d9c71701a9969a6e56100bb9a0f8a7ec421350e953979e92f12
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop-codeur (0.
|
4
|
+
rubocop-codeur (0.4.0)
|
5
5
|
rubocop (~> 1.25)
|
6
|
-
rubocop-github (~> 0.17)
|
7
6
|
rubocop-minitest (~> 0.10, >= 0.10.2)
|
8
7
|
rubocop-performance (~> 1.9, >= 1.9.2)
|
9
8
|
rubocop-rails (~> 2.9, >= 2.9.1)
|
@@ -19,7 +18,7 @@ GEM
|
|
19
18
|
ast (2.4.2)
|
20
19
|
concurrent-ruby (1.1.9)
|
21
20
|
docile (1.4.0)
|
22
|
-
i18n (1.9.
|
21
|
+
i18n (1.9.1)
|
23
22
|
concurrent-ruby (~> 1.0)
|
24
23
|
minitest (5.15.0)
|
25
24
|
parallel (1.21.0)
|
@@ -41,10 +40,6 @@ GEM
|
|
41
40
|
unicode-display_width (>= 1.4.0, < 3.0)
|
42
41
|
rubocop-ast (1.15.1)
|
43
42
|
parser (>= 3.0.1.1)
|
44
|
-
rubocop-github (0.17.0)
|
45
|
-
rubocop
|
46
|
-
rubocop-performance
|
47
|
-
rubocop-rails
|
48
43
|
rubocop-minitest (0.17.0)
|
49
44
|
rubocop (>= 0.90, < 2.0)
|
50
45
|
rubocop-performance (1.13.2)
|
data/README.md
CHANGED
@@ -25,8 +25,8 @@ Then run:
|
|
25
25
|
`bundle exec rubocop`
|
26
26
|
|
27
27
|
You don't need to include rubocop directly in your application's dependencies.
|
28
|
-
`rubocop-codeur` will include `rubocop`, `rubocop-
|
29
|
-
|
28
|
+
`rubocop-codeur` will include `rubocop`, `rubocop-minitest`, `rubocop-performance`,
|
29
|
+
and `rubocop-rails` dependencies.
|
30
30
|
|
31
31
|
It might be necessary to override style rules set in this gem for some projects
|
32
32
|
or to add specific ones. Rule inheritance provided by RuboCop works like the
|
@@ -48,6 +48,17 @@ AllCops:
|
|
48
48
|
|
49
49
|
Note that those overriding should be avoided as much as possible.
|
50
50
|
|
51
|
+
## Testing
|
52
|
+
|
53
|
+
Run:
|
54
|
+
```bash
|
55
|
+
bin/rake test
|
56
|
+
```
|
57
|
+
or simply:
|
58
|
+
```bash
|
59
|
+
bin/rake
|
60
|
+
```
|
61
|
+
|
51
62
|
## Release
|
52
63
|
Before all, configure your credentials for RubyGems :
|
53
64
|
|
data/default.yml
CHANGED
@@ -4,10 +4,6 @@ require:
|
|
4
4
|
- rubocop-performance
|
5
5
|
- rubocop-rails
|
6
6
|
|
7
|
-
inherit_gem:
|
8
|
-
rubocop-github:
|
9
|
-
- config/default.yml
|
10
|
-
|
11
7
|
AllCops:
|
12
8
|
Exclude:
|
13
9
|
- 'db/schema.rb'
|
@@ -36,10 +32,12 @@ Codeur/RailsAvoidInstanceMethodsInHelpers:
|
|
36
32
|
Enabled: true
|
37
33
|
|
38
34
|
Layout/AccessModifierIndentation:
|
35
|
+
Enabled: true
|
39
36
|
EnforcedStyle: outdent
|
40
37
|
IndentationWidth: 2
|
41
38
|
|
42
39
|
Layout/ArgumentAlignment:
|
40
|
+
Enabled: true
|
43
41
|
EnforcedStyle: with_first_argument
|
44
42
|
|
45
43
|
Layout/ClassStructure:
|
@@ -51,6 +49,7 @@ Layout/ClassStructure:
|
|
51
49
|
- constants
|
52
50
|
- attributes
|
53
51
|
- has_ancestry
|
52
|
+
- delegated_type
|
54
53
|
- belongs_to
|
55
54
|
- has_many
|
56
55
|
- has_one
|
@@ -123,29 +122,36 @@ Layout/ClassStructure:
|
|
123
122
|
- validate
|
124
123
|
|
125
124
|
Layout/FirstArrayElementIndentation:
|
125
|
+
Enabled: true
|
126
126
|
EnforcedStyle: consistent
|
127
127
|
|
128
128
|
Layout/FirstHashElementIndentation:
|
129
|
+
Enabled: true
|
129
130
|
EnforcedStyle: consistent
|
130
131
|
|
131
132
|
Layout/HashAlignment:
|
133
|
+
Enabled: true
|
132
134
|
EnforcedHashRocketStyle: table
|
133
135
|
EnforcedColonStyle: table
|
134
136
|
|
135
137
|
Layout/LineLength:
|
138
|
+
Enabled: true
|
136
139
|
Max: 200
|
137
140
|
AutoCorrect: false
|
138
141
|
Exclude:
|
139
142
|
- 'db/migrate/*'
|
140
143
|
|
141
144
|
Layout/MultilineMethodCallIndentation:
|
145
|
+
Enabled: true
|
142
146
|
EnforcedStyle: indented
|
143
147
|
|
144
148
|
Layout/ParameterAlignment:
|
149
|
+
Enabled: true
|
145
150
|
EnforcedStyle: with_fixed_indentation
|
146
151
|
IndentationWidth: 2
|
147
152
|
|
148
153
|
Lint/DuplicateMethods:
|
154
|
+
Enabled: true
|
149
155
|
Exclude:
|
150
156
|
- 'db/migrate/*'
|
151
157
|
|
@@ -159,11 +165,13 @@ Lint/StructNewOverride:
|
|
159
165
|
Enabled: true
|
160
166
|
|
161
167
|
Metrics/AbcSize:
|
168
|
+
Enabled: true
|
162
169
|
Max: 65
|
163
170
|
Exclude:
|
164
171
|
- 'db/migrate/*'
|
165
172
|
|
166
173
|
Metrics/BlockLength:
|
174
|
+
Enabled: true
|
167
175
|
Max: 60
|
168
176
|
Exclude:
|
169
177
|
- 'config/routes.rb'
|
@@ -171,28 +179,34 @@ Metrics/BlockLength:
|
|
171
179
|
- 'app/states/*'
|
172
180
|
|
173
181
|
Metrics/ClassLength:
|
182
|
+
Enabled: true
|
174
183
|
Max: 300
|
175
184
|
Exclude:
|
176
185
|
- 'app/models/**/*'
|
177
186
|
|
178
187
|
Metrics/CyclomaticComplexity:
|
188
|
+
Enabled: true
|
179
189
|
Max: 10
|
180
190
|
|
181
191
|
Metrics/MethodLength:
|
192
|
+
Enabled: true
|
182
193
|
Max: 60
|
183
194
|
Exclude:
|
184
195
|
- 'db/migrate/*'
|
185
196
|
|
186
197
|
Metrics/ModuleLength:
|
198
|
+
Enabled: true
|
187
199
|
Max: 300
|
188
200
|
|
189
201
|
Metrics/PerceivedComplexity:
|
202
|
+
Enabled: true
|
190
203
|
Max: 10
|
191
204
|
|
192
205
|
Minitest/TestMethodName:
|
193
206
|
Enabled: false
|
194
207
|
|
195
208
|
Minitest/MultipleAssertions:
|
209
|
+
Enabled: true
|
196
210
|
Max: 30
|
197
211
|
|
198
212
|
# Disabled because it doesn't with symbols like: record_001
|
@@ -203,16 +217,20 @@ Rails/BulkChangeTable:
|
|
203
217
|
Enabled: false
|
204
218
|
|
205
219
|
Rails/CreateTableWithTimestamps:
|
220
|
+
Enabled: true
|
206
221
|
Exclude:
|
207
222
|
- 'db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb'
|
208
223
|
|
209
224
|
Rails/EnvironmentVariableAccess:
|
225
|
+
Enabled: true
|
210
226
|
AllowReads: true
|
211
227
|
|
212
228
|
Rails/FilePath:
|
229
|
+
Enabled: true
|
213
230
|
EnforcedStyle: arguments
|
214
231
|
|
215
232
|
Rails/ReversibleMigration:
|
233
|
+
Enabled: true
|
216
234
|
Exclude:
|
217
235
|
- 'db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb'
|
218
236
|
|
@@ -230,6 +248,7 @@ Rails/TimeZone:
|
|
230
248
|
AutoCorrect: false
|
231
249
|
|
232
250
|
Rails/UnknownEnv:
|
251
|
+
Enabled: true
|
233
252
|
Environments:
|
234
253
|
- development
|
235
254
|
- test
|
@@ -240,6 +259,7 @@ Style/AsciiComments:
|
|
240
259
|
Enabled: false
|
241
260
|
|
242
261
|
Style/ClassAndModuleChildren:
|
262
|
+
Enabled: true
|
243
263
|
AutoCorrect: true
|
244
264
|
|
245
265
|
Style/ConditionalAssignment:
|
@@ -249,15 +269,21 @@ Style/Documentation:
|
|
249
269
|
Enabled: false
|
250
270
|
|
251
271
|
Style/EmptyMethod:
|
272
|
+
Enabled: true
|
252
273
|
EnforcedStyle: expanded
|
253
274
|
|
254
275
|
Style/GuardClause:
|
276
|
+
Enabled: true
|
255
277
|
MinBodyLength: 3
|
256
278
|
|
257
279
|
Style/HashEachMethods:
|
258
280
|
Enabled: true
|
259
281
|
AutoCorrect: true
|
260
282
|
|
283
|
+
Style/HashSyntax:
|
284
|
+
Enabled: true
|
285
|
+
EnforcedStyle: ruby19
|
286
|
+
|
261
287
|
Style/HashTransformKeys:
|
262
288
|
Enabled: true
|
263
289
|
AutoCorrect: true
|
@@ -279,9 +305,11 @@ Style/NumericPredicate:
|
|
279
305
|
Enabled: false
|
280
306
|
|
281
307
|
Style/StringLiterals:
|
308
|
+
Enabled: true
|
282
309
|
EnforcedStyle: single_quotes
|
283
310
|
|
284
311
|
Style/SymbolArray:
|
312
|
+
Enabled: true
|
285
313
|
MinSize: 7
|
286
314
|
|
287
315
|
Style/FormatStringToken:
|
data/rubocop-codeur.gemspec
CHANGED
@@ -21,7 +21,6 @@ Gem::Specification.new do |spec|
|
|
21
21
|
end
|
22
22
|
|
23
23
|
spec.add_dependency 'rubocop', '~> 1.25'
|
24
|
-
spec.add_dependency 'rubocop-github', '~> 0.17'
|
25
24
|
spec.add_dependency 'rubocop-minitest', '~> 0.10', '>=0.10.2'
|
26
25
|
spec.add_dependency 'rubocop-performance', '~> 1.9', '>= 1.9.2'
|
27
26
|
spec.add_dependency 'rubocop-rails', '~> 2.9', '>= 2.9.1'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-codeur
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Codeur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.25'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rubocop-github
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0.17'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0.17'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rubocop-minitest
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|