netsoft-rubocop 1.1.9 → 1.1.11

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: 6a0d1ee92ce41dac210aff7575ff6c36ce179b24d27c186797918b70402a7a26
4
- data.tar.gz: 85727b896a601190f4a636b19e208618c851533850face137b7dc71354088351
3
+ metadata.gz: 631992cbc07c88809b99369140912e2f60489828ababe6478ccc60c466b4282d
4
+ data.tar.gz: 9479dbc7283e801e21c2bfe0847dc935c5ef1381a0dfddf1f7fb13d189b73f90
5
5
  SHA512:
6
- metadata.gz: 21521b53f90fb9ee1982b5a82b12256189d86a53afdcb4a2ed95438faa6ae9704c874105934815ec205f5eca6e0c6b54d03571ab7f8f0d1e904a9f89de486c1d
7
- data.tar.gz: ce205d3d13f12131fc597ac9265ef3d8d0d63898c7b1d15581cfdd193ea834d67d5d4e016b1f0517e7556aa19d74bfba8f4c4cab29a097eb889e06c81fe0879d
6
+ metadata.gz: 891a5e57b12bcd22cdbe72a7eb6e341823a7b9ae33c59b94d70f30ea33174d124c52fa697148fbe21b4193a386df91af5524b61e1b00e21d7f72e3fbf9daeea2
7
+ data.tar.gz: 160ae680afe2edf716d386b8e354cfb92499f082c36c2445a9d321c6a7ac83a33da2eef7a514ec6d3d6e6aba365031a7a37fcbc3442bd0e8a11883386c7a317c
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.11] - 2026-04-21
14
+ ### Changed
15
+ - update rubocop, and rubocop-[everything] to latest possible versions as of April 2026
16
+ - add new rules according to new cops emerged
17
+
18
+ ## [1.1.10] - 2025-08-11
19
+ ### Changed
20
+ - update rubocop, and rubocop-[everything] to latest possible versions as of end of July 2025
21
+ - add new rules according to new cops emerged
22
+
13
23
  ## [1.1.9] - 2024-06-17
14
24
  ### Changed
15
25
  - update rubocop, and rubocop-[everything] to latest possible versions that support Ruby 2
data/config/default.yml CHANGED
@@ -1,5 +1,8 @@
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
@@ -7,7 +10,6 @@ require:
7
10
  - rubocop-capybara
8
11
  - rubocop-rspec_rails
9
12
  - rubocop-factory_bot
10
- - rubocop-graphql
11
13
 
12
14
  AllCops:
13
15
  TargetRubyVersion: 2.5
@@ -86,6 +88,21 @@ Lint/NonDeterministicRequireOrder:
86
88
 
87
89
  Lint/StructNewOverride:
88
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
89
106
  #endregion
90
107
 
91
108
  # region Naming
@@ -116,12 +133,23 @@ Naming/MethodParameterName:
116
133
  - uo
117
134
  - up
118
135
 
119
- Naming/PredicateName:
136
+ Naming/PredicatePrefix:
120
137
  # By default, it also forbids has_, but that's rarely a good suggestion:
121
138
  # is #has_screenshots? => #screenshots? better?..
122
139
  ForbiddenPrefixes:
123
140
  - is_
124
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
+
125
153
  Naming/VariableNumber:
126
154
  Enabled: false
127
155
  # endregion
@@ -271,6 +299,19 @@ RSpec/UndescriptiveLiteralsDescription:
271
299
  Capybara/NegationMatcher:
272
300
  Enabled: false
273
301
 
302
+ # Prohibits all and every case like
303
+ # foo = some.calculated.values
304
+ #
305
+ # it_should_behave_like 'some context', foo
306
+ #
307
+ # # or
308
+ # foo.each do
309
+ # context "when #{_1}"
310
+ #
311
+ # Those are useful cases with no drawbacks, but rspec-rubocop still considers them "leaky"
312
+ RSpec/LeakyLocalVariable:
313
+ Enabled: false
314
+
274
315
  # endregion
275
316
 
276
317
  # region Style
@@ -328,8 +369,17 @@ Style/FormatString:
328
369
  Style/FormatStringToken:
329
370
  Enabled: false
330
371
 
372
+ # Enforces, when there is a hash in the end of the array, to either always use
373
+ # [foo, bar, {baz: blah}]
374
+ # or always
375
+ # [foo, bar, baz: blah]
376
+ #
377
+ # Both are OK, and might be cleaner/better visible depending on the context.
331
378
  Style/HashAsLastArrayItem:
332
- EnforcedStyle: no_braces
379
+ Enabled: false
380
+
381
+ Style/HashSyntax:
382
+ EnforcedShorthandSyntax: always
333
383
 
334
384
  Style/Lambda:
335
385
  EnforcedStyle: literal
@@ -359,6 +409,11 @@ Style/NumberedParameters:
359
409
  Style/NumberedParametersLimit:
360
410
  Max: 2
361
411
 
412
+ # That's a "reasonable default", which there is no need to enforce. Sometimes small utility files or
413
+ # core_ext.rb might want to digress, and nobody will die.
414
+ Style/OneClassPerFile:
415
+ Enabled: false
416
+
362
417
  # Just prohibits OpenStruct forever. Technically reasonable, but when we use it, we know what we do
363
418
  Style/OpenStructUse:
364
419
  Enabled: false
@@ -383,6 +438,14 @@ Style/RescueModifier:
383
438
  Style/RescueStandardError:
384
439
  Enabled: false
385
440
 
441
+ # Limits number of calls in chaing with safe navigation, e.g. `foo&.bar&.baz` is OK,
442
+ # but `foo&.bar&.baz&.blah&.fetch('foo')&.length` is not.
443
+ # Might be a reasonable idea _sometimes_, but long chains are frequently the clearest way to
444
+ # invoke something that can be absent at several points. The constant limit of chain length
445
+ # doesn't bring much value.
446
+ Style/SafeNavigationChainLength:
447
+ Enabled: false
448
+
386
449
  Style/SingleArgumentDig:
387
450
  Enabled: false
388
451
 
@@ -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.9'
5
+ VERSION = '1.1.11'
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.9
4
+ version: 1.1.11
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: 2024-06-17 00:00:00.000000000 Z
12
+ date: 2026-04-23 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.64.1
20
+ version: 1.86.1
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.64.1
27
+ version: 1.86.1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rubocop-graphql
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -45,99 +45,99 @@ dependencies:
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 1.21.0
48
+ version: 1.26.1
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.21.0
55
+ version: 1.26.1
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.25.0
62
+ version: 2.34.3
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.25.0
69
+ version: 2.34.3
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: 3.0.1
90
+ version: 3.9.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: 3.0.1
97
+ version: 3.9.0
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rubocop-capybara
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - '='
103
103
  - !ruby/object:Gem::Version
104
- version: 2.21.0
104
+ version: 2.22.1
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - '='
110
110
  - !ruby/object:Gem::Version
111
- version: 2.21.0
111
+ version: 2.22.1
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: rubocop-factory_bot
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 2.26.1
118
+ version: 2.28.0
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - '='
124
124
  - !ruby/object:Gem::Version
125
- version: 2.26.1
125
+ version: 2.28.0
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: rubocop-rspec_rails
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - '='
131
131
  - !ruby/object:Gem::Version
132
- version: 2.30.0
132
+ version: 2.32.0
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - '='
138
138
  - !ruby/object:Gem::Version
139
- version: 2.30.0
140
- description:
139
+ version: 2.32.0
140
+ description:
141
141
  email:
142
142
  - alex.yarotsky@hubstaff.com
143
143
  - edward@hubstaff.com
@@ -159,7 +159,7 @@ files:
159
159
  homepage: https://github.com/netsoftHoldings/netsoft-rubocop
160
160
  licenses: []
161
161
  metadata: {}
162
- post_install_message:
162
+ post_install_message:
163
163
  rdoc_options: []
164
164
  require_paths:
165
165
  - lib
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubygems_version: 3.4.19
178
- signing_key:
178
+ signing_key:
179
179
  specification_version: 4
180
180
  summary: Hubstaff style guides and shared style configs.
181
181
  test_files: []