netsoft-rubocop 1.1.5 → 1.1.6
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/CHANGELOG.md +5 -0
- data/config/default.yml +51 -0
- data/lib/netsoft/rubocop/version.rb +1 -1
- metadata +19 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39717e5ea41de3500fd48f80354cbcab7e6a17883849b65204cf0f4c9115aa68
|
4
|
+
data.tar.gz: 2c66856f4b5f2edf8b470bb1618af29576c1171d47354c00c83ea26dd30493df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c74f50aeb84d9ae9dcbaf82df925893a2897e51c810a1acd953e0096dc2b923bc0056984a46590a46be4e8c68c54a71ac114fcc5b1561340ece011ac0e969fb
|
7
|
+
data.tar.gz: a088988f8827d1b6750340a93a6ec7122fb4c55b4044ec93f90e435a0d502a76d445c03251d2758f07f3f096b7f65f32a46bfed00c8951d406c9375a9e74cc41
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
10
10
|
### Changed
|
11
11
|
### Fixed
|
12
12
|
|
13
|
+
## [1.1.6] - 2022-05-31
|
14
|
+
### Changed
|
15
|
+
- update rubocop, and rubocop-[everything] to latest versions
|
16
|
+
- add new rules according to new cops emerged
|
17
|
+
|
13
18
|
## [1.1.5] - 2022-03-18
|
14
19
|
### Changed
|
15
20
|
- adjust assignment indent rule to be default 2 space indent
|
data/config/default.yml
CHANGED
@@ -4,6 +4,9 @@ require:
|
|
4
4
|
- rubocop-performance
|
5
5
|
- rubocop-rspec
|
6
6
|
- rubocop-rake
|
7
|
+
- rubocop-capybara
|
8
|
+
- rubocop-factory_bot
|
9
|
+
- rubocop-graphql
|
7
10
|
|
8
11
|
AllCops:
|
9
12
|
TargetRubyVersion: 2.5
|
@@ -12,6 +15,7 @@ AllCops:
|
|
12
15
|
StyleGuideBaseURL: https://rubystyle.guide
|
13
16
|
NewCops: enable
|
14
17
|
Exclude:
|
18
|
+
- 'bin/**/*'
|
15
19
|
- 'db/**/*'
|
16
20
|
- 'coverage/**/*'
|
17
21
|
- 'log/**/*'
|
@@ -21,6 +25,7 @@ AllCops:
|
|
21
25
|
- 'vendor/**/*'
|
22
26
|
- 'gemfiles/**/*'
|
23
27
|
- 'node_modules/**/*'
|
28
|
+
- '.pryrc'
|
24
29
|
|
25
30
|
# Checks that the gemspec has metadata to require MFA from RubyGems
|
26
31
|
# Irrelevant for internal gems
|
@@ -44,6 +49,9 @@ Layout/FirstArrayElementIndentation:
|
|
44
49
|
Layout/FirstHashElementIndentation:
|
45
50
|
EnforcedStyle: consistent
|
46
51
|
|
52
|
+
Layout/LineContinuationSpacing:
|
53
|
+
EnforcedStyle: no_space
|
54
|
+
|
47
55
|
Layout/SpaceInsideBlockBraces:
|
48
56
|
EnforcedStyle: space
|
49
57
|
SpaceBeforeBlockParameters: true
|
@@ -139,6 +147,13 @@ Performance/TimesMap:
|
|
139
147
|
Rails:
|
140
148
|
Enabled: true
|
141
149
|
|
150
|
+
# Requires to always use `I18n.t('foo.bar.baz')` instead of I18n.t(:baz, scope: [:foo, :bar])`
|
151
|
+
# because it is "easier to read".
|
152
|
+
# The latter is superior when scopes are dynamic, or just very long. Cop doesn't have a setting
|
153
|
+
# for one style or another, just always forces dots.
|
154
|
+
Rails/DotSeparatedKeys:
|
155
|
+
Enabled: false
|
156
|
+
|
142
157
|
Rails/FilePath:
|
143
158
|
EnforcedStyle: arguments
|
144
159
|
|
@@ -152,6 +167,11 @@ Rails/HttpPositionalArguments:
|
|
152
167
|
Rails/HttpStatus:
|
153
168
|
EnforcedStyle: numeric
|
154
169
|
|
170
|
+
# Forces _all_ strings to be in locales. Not gonna happen in any foreseeable future.
|
171
|
+
Rails/I18nLocaleTexts:
|
172
|
+
Enabled: false
|
173
|
+
|
174
|
+
|
155
175
|
# The cop states that if you have `belongs_to :organization`, the validator is added automatically,
|
156
176
|
# so you don't need `validates :organization, presence: true` (or `validates :organization_id`).
|
157
177
|
#
|
@@ -177,10 +197,16 @@ Netsoft/AuthHttpPositionalArguments:
|
|
177
197
|
# endregion
|
178
198
|
|
179
199
|
# region RSpec
|
200
|
+
|
180
201
|
# Prohibits before/after(:all) for ever uses. But when we use it, we know what we do
|
181
202
|
RSpec/BeforeAfterAll:
|
182
203
|
Enabled: false
|
183
204
|
|
205
|
+
# Unnecessary formality to require replacing `eq true` with `be true`
|
206
|
+
# (for true, false and nil) because it is "stricter".
|
207
|
+
RSpec/BeEq:
|
208
|
+
Enabled: false
|
209
|
+
|
184
210
|
RSpec/ExpectChange:
|
185
211
|
EnforcedStyle: block
|
186
212
|
|
@@ -214,6 +240,14 @@ RSpec/NestedGroups:
|
|
214
240
|
RSpec/NotToNot:
|
215
241
|
EnforcedStyle: to_not
|
216
242
|
|
243
|
+
# Wants metadata keys to be alphabetically sorted. Like, really?..
|
244
|
+
RSpec/SortMetadata:
|
245
|
+
Enabled: false
|
246
|
+
|
247
|
+
# Same as for Rails/HttpStatus
|
248
|
+
RSpec/Rails/HttpStatus:
|
249
|
+
EnforcedStyle: numeric
|
250
|
+
|
217
251
|
# endregion
|
218
252
|
|
219
253
|
# region Style
|
@@ -253,6 +287,11 @@ Style/DocumentDynamicEvalDefinition:
|
|
253
287
|
Style/DoubleNegation:
|
254
288
|
Enabled: false
|
255
289
|
|
290
|
+
# Requires to replace all (0..10).each { ... } with 10.times { ... }
|
291
|
+
# Not always the most expressive option.
|
292
|
+
Style/EachForSimpleLoop:
|
293
|
+
Enabled: false
|
294
|
+
|
256
295
|
# Asks to write empty methods this way:
|
257
296
|
#
|
258
297
|
# def foo; end
|
@@ -272,6 +311,13 @@ Style/HashAsLastArrayItem:
|
|
272
311
|
Style/Lambda:
|
273
312
|
EnforcedStyle: literal
|
274
313
|
|
314
|
+
# Forces to change `foo = val < 0 ? 0 : val` to `foo = [0, val].max`
|
315
|
+
# Proper readable change is actually `foo = val.clamp(0..)`, but there is no such option.
|
316
|
+
# The one with max/min produces weird-ish statements frequently, so it is better to wait for
|
317
|
+
# a clamp-ing cop or create it ourselves.
|
318
|
+
Style/MinMaxComparison:
|
319
|
+
Enabled: false
|
320
|
+
|
275
321
|
Style/MultilineBlockChain:
|
276
322
|
Enabled: false
|
277
323
|
|
@@ -301,6 +347,11 @@ Style/QuotedSymbols:
|
|
301
347
|
Style/ParallelAssignment:
|
302
348
|
Enabled: false
|
303
349
|
|
350
|
+
# Prohibits `::Foo` style constants unless strictly necessary. Reasonable, but glitches with
|
351
|
+
# autoloading/guessing from where to autoload.
|
352
|
+
Style/RedundantConstantBase:
|
353
|
+
Enabled: false
|
354
|
+
|
304
355
|
Style/RescueModifier:
|
305
356
|
Enabled: false
|
306
357
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netsoft-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Yarotsky
|
@@ -9,78 +9,64 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - "~>"
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '1.15'
|
21
|
-
type: :development
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - "~>"
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '1.15'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: rake
|
15
|
+
name: rubocop
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|
31
17
|
requirements:
|
32
|
-
- -
|
18
|
+
- - '='
|
33
19
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
35
|
-
type: :
|
20
|
+
version: 1.51.0
|
21
|
+
type: :runtime
|
36
22
|
prerelease: false
|
37
23
|
version_requirements: !ruby/object:Gem::Requirement
|
38
24
|
requirements:
|
39
|
-
- -
|
25
|
+
- - '='
|
40
26
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
27
|
+
version: 1.51.0
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
|
-
name: rubocop
|
29
|
+
name: rubocop-graphql
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|
45
31
|
requirements:
|
46
32
|
- - '='
|
47
33
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.
|
34
|
+
version: 1.1.1
|
49
35
|
type: :runtime
|
50
36
|
prerelease: false
|
51
37
|
version_requirements: !ruby/object:Gem::Requirement
|
52
38
|
requirements:
|
53
39
|
- - '='
|
54
40
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.
|
41
|
+
version: 1.1.1
|
56
42
|
- !ruby/object:Gem::Dependency
|
57
43
|
name: rubocop-performance
|
58
44
|
requirement: !ruby/object:Gem::Requirement
|
59
45
|
requirements:
|
60
46
|
- - '='
|
61
47
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.
|
48
|
+
version: 1.18.0
|
63
49
|
type: :runtime
|
64
50
|
prerelease: false
|
65
51
|
version_requirements: !ruby/object:Gem::Requirement
|
66
52
|
requirements:
|
67
53
|
- - '='
|
68
54
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.
|
55
|
+
version: 1.18.0
|
70
56
|
- !ruby/object:Gem::Dependency
|
71
57
|
name: rubocop-rails
|
72
58
|
requirement: !ruby/object:Gem::Requirement
|
73
59
|
requirements:
|
74
60
|
- - '='
|
75
61
|
- !ruby/object:Gem::Version
|
76
|
-
version: 2.
|
62
|
+
version: 2.19.1
|
77
63
|
type: :runtime
|
78
64
|
prerelease: false
|
79
65
|
version_requirements: !ruby/object:Gem::Requirement
|
80
66
|
requirements:
|
81
67
|
- - '='
|
82
68
|
- !ruby/object:Gem::Version
|
83
|
-
version: 2.
|
69
|
+
version: 2.19.1
|
84
70
|
- !ruby/object:Gem::Dependency
|
85
71
|
name: rubocop-rake
|
86
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,14 +87,14 @@ dependencies:
|
|
101
87
|
requirements:
|
102
88
|
- - '='
|
103
89
|
- !ruby/object:Gem::Version
|
104
|
-
version: 2.
|
90
|
+
version: 2.22.0
|
105
91
|
type: :runtime
|
106
92
|
prerelease: false
|
107
93
|
version_requirements: !ruby/object:Gem::Requirement
|
108
94
|
requirements:
|
109
95
|
- - '='
|
110
96
|
- !ruby/object:Gem::Version
|
111
|
-
version: 2.
|
97
|
+
version: 2.22.0
|
112
98
|
description:
|
113
99
|
email:
|
114
100
|
- alex.yarotsky@hubstaff.com
|
@@ -139,14 +125,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
125
|
requirements:
|
140
126
|
- - ">="
|
141
127
|
- !ruby/object:Gem::Version
|
142
|
-
version: '2.
|
128
|
+
version: '2.7'
|
143
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
130
|
requirements:
|
145
131
|
- - ">="
|
146
132
|
- !ruby/object:Gem::Version
|
147
133
|
version: '0'
|
148
134
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
135
|
+
rubygems_version: 3.4.10
|
150
136
|
signing_key:
|
151
137
|
specification_version: 4
|
152
138
|
summary: Hubstaff style guides and shared style configs.
|