netsoft-rubocop 1.1.5 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 137bac43dbc24c4c97d694b86c893d4d8ea0d1257484502e6f4b5b3bd2397f81
4
- data.tar.gz: d5572d8300095922e67612bb861a717b325f9dcc1c970b48b2063ac9d0156366
3
+ metadata.gz: 61d6a9eefb4b10ca7c1c7688b1307eb6f8fa66642e9629c16e9b5e70e9be48b1
4
+ data.tar.gz: 23afa0de0b2926dd3f8e1a2c0039d5d92323a2160cba8072dfce3809350bf03e
5
5
  SHA512:
6
- metadata.gz: d0363016db98c292c39722f2002ebeb1e3bb328830ec67f509e91521da6faa51cd5d63ba24bfffdea7f4d10cd9e38926938b60c4311778a45fdee04cc4bb098d
7
- data.tar.gz: 21b11561021e15205431a124d6aca6e28f7f1c3a614c45ac218c0c336c82101cbeeedd534ff0b65a9c2812275c46565a22b96432e2942236e81629a163265ac5
6
+ metadata.gz: 8f4a57da2cd304d4ddc6fc729b3097baaea0f79f41eb2d17420307a385cd622f12e6a393215c674c8ae080f92765c78932953dd0a1ce0c18b2f94e02d4a26a79
7
+ data.tar.gz: 543f87a74d13cd5af7555791463d2dbeb95769f0314b2d29d8b42300884fb4e49110aea9cd063816888c9eccaae831ddb3762c1280fcaa58bb998611180a90ce
data/CHANGELOG.md CHANGED
@@ -10,6 +10,17 @@ 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.7] - 2023-10-18
14
+ ### Changed
15
+ - update rubocop, and rubocop-[everything] to latest versions
16
+ - add new rules according to new cops emerged
17
+
18
+
19
+ ## [1.1.6] - 2023-05-31
20
+ ### Changed
21
+ - update rubocop, and rubocop-[everything] to latest versions
22
+ - add new rules according to new cops emerged
23
+
13
24
  ## [1.1.5] - 2022-03-18
14
25
  ### Changed
15
26
  - 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
@@ -31,6 +36,12 @@ Gemspec/RequireMFA:
31
36
  Layout/AssignmentIndentation:
32
37
  IndentationWidth: 2
33
38
 
39
+ # prohibits empty line before `rescue`. But `rescue` frequently a complicated statement, and
40
+ # last body's statement before it might be complicated too, so there is no reason to not put
41
+ # an extra line there if the writer wants.
42
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
43
+ Enabled: false
44
+
34
45
  Layout/ExtraSpacing:
35
46
  AllowForAlignment: true
36
47
 
@@ -44,6 +55,9 @@ Layout/FirstArrayElementIndentation:
44
55
  Layout/FirstHashElementIndentation:
45
56
  EnforcedStyle: consistent
46
57
 
58
+ Layout/LineContinuationSpacing:
59
+ EnforcedStyle: no_space
60
+
47
61
  Layout/SpaceInsideBlockBraces:
48
62
  EnforcedStyle: space
49
63
  SpaceBeforeBlockParameters: true
@@ -139,6 +153,13 @@ Performance/TimesMap:
139
153
  Rails:
140
154
  Enabled: true
141
155
 
156
+ # Requires to always use `I18n.t('foo.bar.baz')` instead of I18n.t(:baz, scope: [:foo, :bar])`
157
+ # because it is "easier to read".
158
+ # The latter is superior when scopes are dynamic, or just very long. Cop doesn't have a setting
159
+ # for one style or another, just always forces dots.
160
+ Rails/DotSeparatedKeys:
161
+ Enabled: false
162
+
142
163
  Rails/FilePath:
143
164
  EnforcedStyle: arguments
144
165
 
@@ -152,6 +173,11 @@ Rails/HttpPositionalArguments:
152
173
  Rails/HttpStatus:
153
174
  EnforcedStyle: numeric
154
175
 
176
+ # Forces _all_ strings to be in locales. Not gonna happen in any foreseeable future.
177
+ Rails/I18nLocaleTexts:
178
+ Enabled: false
179
+
180
+
155
181
  # The cop states that if you have `belongs_to :organization`, the validator is added automatically,
156
182
  # so you don't need `validates :organization, presence: true` (or `validates :organization_id`).
157
183
  #
@@ -177,10 +203,16 @@ Netsoft/AuthHttpPositionalArguments:
177
203
  # endregion
178
204
 
179
205
  # region RSpec
206
+
180
207
  # Prohibits before/after(:all) for ever uses. But when we use it, we know what we do
181
208
  RSpec/BeforeAfterAll:
182
209
  Enabled: false
183
210
 
211
+ # Unnecessary formality to require replacing `eq true` with `be true`
212
+ # (for true, false and nil) because it is "stricter".
213
+ RSpec/BeEq:
214
+ Enabled: false
215
+
184
216
  RSpec/ExpectChange:
185
217
  EnforcedStyle: block
186
218
 
@@ -214,6 +246,14 @@ RSpec/NestedGroups:
214
246
  RSpec/NotToNot:
215
247
  EnforcedStyle: to_not
216
248
 
249
+ # Wants metadata keys to be alphabetically sorted. Like, really?..
250
+ RSpec/SortMetadata:
251
+ Enabled: false
252
+
253
+ # Same as for Rails/HttpStatus
254
+ RSpec/Rails/HttpStatus:
255
+ EnforcedStyle: numeric
256
+
217
257
  # endregion
218
258
 
219
259
  # region Style
@@ -253,6 +293,11 @@ Style/DocumentDynamicEvalDefinition:
253
293
  Style/DoubleNegation:
254
294
  Enabled: false
255
295
 
296
+ # Requires to replace all (0..10).each { ... } with 10.times { ... }
297
+ # Not always the most expressive option.
298
+ Style/EachForSimpleLoop:
299
+ Enabled: false
300
+
256
301
  # Asks to write empty methods this way:
257
302
  #
258
303
  # def foo; end
@@ -272,6 +317,13 @@ Style/HashAsLastArrayItem:
272
317
  Style/Lambda:
273
318
  EnforcedStyle: literal
274
319
 
320
+ # Forces to change `foo = val < 0 ? 0 : val` to `foo = [0, val].max`
321
+ # Proper readable change is actually `foo = val.clamp(0..)`, but there is no such option.
322
+ # The one with max/min produces weird-ish statements frequently, so it is better to wait for
323
+ # a clamp-ing cop or create it ourselves.
324
+ Style/MinMaxComparison:
325
+ Enabled: false
326
+
275
327
  Style/MultilineBlockChain:
276
328
  Enabled: false
277
329
 
@@ -301,6 +353,11 @@ Style/QuotedSymbols:
301
353
  Style/ParallelAssignment:
302
354
  Enabled: false
303
355
 
356
+ # Prohibits `::Foo` style constants unless strictly necessary. Reasonable, but glitches with
357
+ # autoloading/guessing from where to autoload.
358
+ Style/RedundantConstantBase:
359
+ Enabled: false
360
+
304
361
  Style/RescueModifier:
305
362
  Enabled: false
306
363
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Netsoft
4
4
  module Rubocop
5
- VERSION = '1.1.5'
5
+ VERSION = '1.1.7'
6
6
  end
7
7
  end
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.5
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Yarotsky
@@ -9,78 +9,92 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-18 00:00:00.000000000 Z
12
+ date: 2023-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: bundler
15
+ name: bigdecimal
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - "<="
19
19
  - !ruby/object:Gem::Version
20
- version: '1.15'
21
- type: :development
20
+ version: 3.1.3
21
+ type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - "<="
26
26
  - !ruby/object:Gem::Version
27
- version: '1.15'
27
+ version: 3.1.3
28
28
  - !ruby/object:Gem::Dependency
29
- name: rake
29
+ name: racc
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - "<="
33
33
  - !ruby/object:Gem::Version
34
- version: '12.0'
35
- type: :development
34
+ version: 1.6.2
35
+ type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - "<="
40
40
  - !ruby/object:Gem::Version
41
- version: '12.0'
41
+ version: 1.6.2
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rubocop
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 1.25.0
48
+ version: 1.57.0
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '='
54
+ - !ruby/object:Gem::Version
55
+ version: 1.57.0
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop-graphql
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '='
61
+ - !ruby/object:Gem::Version
62
+ version: 1.1.1
49
63
  type: :runtime
50
64
  prerelease: false
51
65
  version_requirements: !ruby/object:Gem::Requirement
52
66
  requirements:
53
67
  - - '='
54
68
  - !ruby/object:Gem::Version
55
- version: 1.25.0
69
+ version: 1.1.1
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: rubocop-performance
58
72
  requirement: !ruby/object:Gem::Requirement
59
73
  requirements:
60
74
  - - '='
61
75
  - !ruby/object:Gem::Version
62
- version: 1.13.2
76
+ version: 1.19.1
63
77
  type: :runtime
64
78
  prerelease: false
65
79
  version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
81
  - - '='
68
82
  - !ruby/object:Gem::Version
69
- version: 1.13.2
83
+ version: 1.19.1
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: rubocop-rails
72
86
  requirement: !ruby/object:Gem::Requirement
73
87
  requirements:
74
88
  - - '='
75
89
  - !ruby/object:Gem::Version
76
- version: 2.13.2
90
+ version: 2.21.2
77
91
  type: :runtime
78
92
  prerelease: false
79
93
  version_requirements: !ruby/object:Gem::Requirement
80
94
  requirements:
81
95
  - - '='
82
96
  - !ruby/object:Gem::Version
83
- version: 2.13.2
97
+ version: 2.21.2
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: rubocop-rake
86
100
  requirement: !ruby/object:Gem::Requirement
@@ -101,14 +115,14 @@ dependencies:
101
115
  requirements:
102
116
  - - '='
103
117
  - !ruby/object:Gem::Version
104
- version: 2.7.0
118
+ version: 2.24.1
105
119
  type: :runtime
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
123
  - - '='
110
124
  - !ruby/object:Gem::Version
111
- version: 2.7.0
125
+ version: 2.24.1
112
126
  description:
113
127
  email:
114
128
  - alex.yarotsky@hubstaff.com
@@ -139,14 +153,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
139
153
  requirements:
140
154
  - - ">="
141
155
  - !ruby/object:Gem::Version
142
- version: '2.4'
156
+ version: '2.7'
143
157
  required_rubygems_version: !ruby/object:Gem::Requirement
144
158
  requirements:
145
159
  - - ">="
146
160
  - !ruby/object:Gem::Version
147
161
  version: '0'
148
162
  requirements: []
149
- rubygems_version: 3.0.3
163
+ rubygems_version: 3.4.10
150
164
  signing_key:
151
165
  specification_version: 4
152
166
  summary: Hubstaff style guides and shared style configs.