netsoft-rubocop 1.1.8 → 1.1.10

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
2
  SHA256:
3
- metadata.gz: 6c7abd8532a60251c8b7e284add09679ca54b6c6e1005b57d6ca6fd1844388bb
4
- data.tar.gz: 7c51054e4c9c09f76ca819c406520ca0154487f3ad3fef9da17fb122aabff945
3
+ metadata.gz: 7949f296d24db9ce23537b92dcdd5b88e517f60719f44ace6f5f32cbde3d80a1
4
+ data.tar.gz: a873c697e55edbfd93e1286bb48ab48438a1a1c62d424aa35bbc05f422e0223f
5
5
  SHA512:
6
- metadata.gz: 75a84526711ff8368a1507b438bb1b8bc14aab96e6eae5c5538e3c47ee73da65c1ffaacebd49ad3982a93fa167921e4a0673bd3ebdc3a4e7d2962c1bec247b7d
7
- data.tar.gz: 4b8b15ab4b57bd4851ae03f866be09047089bc24770837b4b5022ff18e5f51101cc16b9b0079653b6011aec2c9c964fd2d684e53701f832b8f89bd3a0297d798
6
+ metadata.gz: 623f5223d4586481783eefbc009687a8415441f29922a129e643391cf1f8c745a84b80da4cdd50b78a2fb9eff9b49621fe9f6ddce4abe94cb599a123da4c1b52
7
+ data.tar.gz: 6e62923f845960b3faf13da5be63e378bf5bb62c836732356aace8ecf2ac9b082e07ca19eb3cf1f3a9839c99a858e2bdf76f5f4c5f1ddc7c48214451f143f14a
data/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@ 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.10] - 2025-08-11
14
+ ### Changed
15
+ - update rubocop, and rubocop-[everything] to latest possible versions as of end of July 2025
16
+ - add new rules according to new cops emerged
17
+
18
+ ## [1.1.9] - 2024-06-17
19
+ ### Changed
20
+ - update rubocop, and rubocop-[everything] to latest possible versions that support Ruby 2
21
+ - add new rules according to new cops emerged
22
+
13
23
  ## [1.1.8] - 2023-12-12
14
24
  ### Fixed
15
25
  - fix dependency on gems that are only necessary for CI
data/config/default.yml CHANGED
@@ -1,12 +1,15 @@
1
1
  require:
2
2
  - ../lib/netsoft/rubocop/cops/netsoft/auth_http_positional_arguments
3
+ - rubocop-graphql
4
+
5
+ plugins:
3
6
  - rubocop-rails
4
7
  - rubocop-performance
5
8
  - rubocop-rspec
6
9
  - rubocop-rake
7
10
  - rubocop-capybara
11
+ - rubocop-rspec_rails
8
12
  - rubocop-factory_bot
9
- - rubocop-graphql
10
13
 
11
14
  AllCops:
12
15
  TargetRubyVersion: 2.5
@@ -85,6 +88,21 @@ Lint/NonDeterministicRequireOrder:
85
88
 
86
89
  Lint/StructNewOverride:
87
90
  Enabled: false
91
+
92
+ # Is unhappy when a constant declared in `private` section of the module, because it doesn't make
93
+ # the constant really private. But we don't really care if the constant is inaccessible to class'
94
+ # clients, and use this layout to have constants closer to where they are used for algorithms.
95
+ Lint/UselessConstantScoping:
96
+ Enabled: false
97
+
98
+ # Is offended by
99
+ # some_obj&.predicate? && some_obj&.other_predicate?
100
+ # ...and suggests to change it to:
101
+ # some_obj&.predicate? && some_obj.other_predicate?
102
+ # (because in second case, if the expression is evaluated, we know some_obj is definitely present).
103
+ # But it looks confusing, and might introduce sudden bugs if conditions are removed or switched.
104
+ Lint/SafeNavigationConsistency:
105
+ Enabled: false
88
106
  #endregion
89
107
 
90
108
  # region Naming
@@ -115,12 +133,23 @@ Naming/MethodParameterName:
115
133
  - uo
116
134
  - up
117
135
 
118
- Naming/PredicateName:
136
+ Naming/PredicatePrefix:
119
137
  # By default, it also forbids has_, but that's rarely a good suggestion:
120
138
  # is #has_screenshots? => #screenshots? better?..
121
139
  ForbiddenPrefixes:
122
140
  - is_
123
141
 
142
+ # Checks if every return value of the method is boolean, and if so, requires method name to
143
+ # end with "?"
144
+ Naming/PredicateMethod:
145
+ # We exclude methods that have typical usage pattern "do work and return true if all valid"
146
+ AllowedMethods:
147
+ - call
148
+ - perform
149
+ - perform_work
150
+ - save
151
+ - save!
152
+
124
153
  Naming/VariableNumber:
125
154
  Enabled: false
126
155
  # endregion
@@ -251,9 +280,25 @@ RSpec/SortMetadata:
251
280
  Enabled: false
252
281
 
253
282
  # Same as for Rails/HttpStatus
254
- RSpec/Rails/HttpStatus:
283
+ RSpecRails/HttpStatus:
255
284
  EnforcedStyle: numeric
256
285
 
286
+ # Limits an amount of items created by `create_list`. This should be a human decision on review, not
287
+ # mechanical limitation.
288
+ FactoryBot/ExcessiveCreateList:
289
+ Enabled: false
290
+
291
+ # Prohibits literals like numbers in the descriptions; which might sometimes be useful, and also conflicts
292
+ # with `its_call(number)` (which it understands like a description).
293
+ RSpec/UndescriptiveLiteralsDescription:
294
+ Enabled: false
295
+
296
+ # Enforces either `to have_no_selector` (the default) or `to_not have_selector` (a setting).
297
+ # We use the latter in our codebase, but there is no reason to strictly prohibit the former (it
298
+ # might be used in chains), so no biggie.
299
+ Capybara/NegationMatcher:
300
+ Enabled: false
301
+
257
302
  # endregion
258
303
 
259
304
  # region Style
@@ -314,6 +359,9 @@ Style/FormatStringToken:
314
359
  Style/HashAsLastArrayItem:
315
360
  EnforcedStyle: no_braces
316
361
 
362
+ Style/HashSyntax:
363
+ EnforcedShorthandSyntax: always
364
+
317
365
  Style/Lambda:
318
366
  EnforcedStyle: literal
319
367
 
@@ -366,6 +414,14 @@ Style/RescueModifier:
366
414
  Style/RescueStandardError:
367
415
  Enabled: false
368
416
 
417
+ # Limits number of calls in chaing with safe navigation, e.g. `foo&.bar&.baz` is OK,
418
+ # but `foo&.bar&.baz&.blah&.fetch('foo')&.length` is not.
419
+ # Might be a reasonable idea _sometimes_, but long chains are frequently the clearest way to
420
+ # invoke something that can be absent at several points. The constant limit of chain length
421
+ # doesn't bring much value.
422
+ Style/SafeNavigationChainLength:
423
+ Enabled: false
424
+
369
425
  Style/SingleArgumentDig:
370
426
  Enabled: false
371
427
 
@@ -18,7 +18,7 @@ module RuboCop
18
18
  #
19
19
  # # good
20
20
  # get :new, params: { user_id: 1 }
21
- class AuthHttpPositionalArguments < Cop
21
+ class AuthHttpPositionalArguments < Base
22
22
  extend RuboCop::Cop::TargetRailsVersion
23
23
 
24
24
  MSG = 'Use keyword arguments instead of positional arguments for http call: `%<verb>s`.'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Netsoft
4
4
  module Rubocop
5
- VERSION = '1.1.8'
5
+ VERSION = '1.1.10'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netsoft-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Yarotsky
8
8
  - Edward Rudd
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-12-19 00:00:00.000000000 Z
12
+ date: 2025-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 1.57.0
20
+ version: 1.79.0
21
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.57.0
27
+ version: 1.79.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rubocop-graphql
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -45,57 +45,99 @@ dependencies:
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 1.19.1
48
+ version: 1.25.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 1.19.1
55
+ version: 1.25.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rubocop-rails
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - '='
61
61
  - !ruby/object:Gem::Version
62
- version: 2.21.2
62
+ version: 2.32.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - '='
68
68
  - !ruby/object:Gem::Version
69
- version: 2.21.2
69
+ version: 2.32.0
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rubocop-rake
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - '='
75
75
  - !ruby/object:Gem::Version
76
- version: 0.6.0
76
+ version: 0.7.1
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - '='
82
82
  - !ruby/object:Gem::Version
83
- version: 0.6.0
83
+ version: 0.7.1
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rubocop-rspec
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - '='
89
89
  - !ruby/object:Gem::Version
90
- version: 2.24.1
90
+ version: 3.6.0
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - '='
96
96
  - !ruby/object:Gem::Version
97
- version: 2.24.1
98
- description:
97
+ version: 3.6.0
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubocop-capybara
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '='
103
+ - !ruby/object:Gem::Version
104
+ version: 2.22.1
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '='
110
+ - !ruby/object:Gem::Version
111
+ version: 2.22.1
112
+ - !ruby/object:Gem::Dependency
113
+ name: rubocop-factory_bot
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - '='
117
+ - !ruby/object:Gem::Version
118
+ version: 2.27.1
119
+ type: :runtime
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - '='
124
+ - !ruby/object:Gem::Version
125
+ version: 2.27.1
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop-rspec_rails
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - '='
131
+ - !ruby/object:Gem::Version
132
+ version: 2.31.0
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - '='
138
+ - !ruby/object:Gem::Version
139
+ version: 2.31.0
140
+ description:
99
141
  email:
100
142
  - alex.yarotsky@hubstaff.com
101
143
  - edward@hubstaff.com
@@ -117,7 +159,7 @@ files:
117
159
  homepage: https://github.com/netsoftHoldings/netsoft-rubocop
118
160
  licenses: []
119
161
  metadata: {}
120
- post_install_message:
162
+ post_install_message:
121
163
  rdoc_options: []
122
164
  require_paths:
123
165
  - lib
@@ -132,8 +174,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
174
  - !ruby/object:Gem::Version
133
175
  version: '0'
134
176
  requirements: []
135
- rubygems_version: 3.4.10
136
- signing_key:
177
+ rubygems_version: 3.4.19
178
+ signing_key:
137
179
  specification_version: 4
138
180
  summary: Hubstaff style guides and shared style configs.
139
181
  test_files: []