rubocop-fourshark 0.9.0 → 0.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f809e807d128c7ab3f1bd4f3f32217bfde29b24c45c3c3e610531fa08fff38c2
4
- data.tar.gz: cf503705817938741d2b144fbb38d1887f72a47bbd0ac0b1e761c46cc3299f70
3
+ metadata.gz: d37d6aedd6756dcc500a7295b9f03dd99f413d12375c29826d5ac6970e11aacc
4
+ data.tar.gz: 7e406a1cb9ddde1f494a3e6d1c90561c87b6bf2d19cc585d69c25c43516a39ea
5
5
  SHA512:
6
- metadata.gz: a37d20936f3bc14e9a5d7c92777a222fb2b364840501775d5ea301d27de15ba69863a5959aca707187d10053495d3753c5012e790fbba5d914500eacea0ea481
7
- data.tar.gz: 85896dc4843fdb5cb2f86ac8366f3fd3284e63928c0bd95779d280fb9807bb61866d7aa68cdc8645f6bdb3543c3b0886e1b2518246b68331ccc02fb8f108f6c4
6
+ metadata.gz: ac6cbcbeaa39f99a6e548b93a7ad05c2cc204013210dbb50686252c3e0c7285d419daf306d53aedc00080d295b7c61efd016f59276e48a0519391e427e287e5c
7
+ data.tar.gz: 540e6ea1264bcf27eeb261546ab74bd75c165bb19488e7098dd358d303e10e162d120c3ef0ea5b3698077bb03cc3a18e59af2ae7f009f24020463ebc3956d8e2
data/.grant.yaml ADDED
@@ -0,0 +1,28 @@
1
+ # License allow-list enforced by `grant` over the Syft SBOM (see .github/workflows/main.yml).
2
+ # Mirrors the licenses the 4Shark Ruby projects permit. require-license/require-known-license
3
+ # are false so a dependency with no declared license or a non-SPDX license string still passes.
4
+ allow:
5
+ - MIT
6
+ - Apache-2.0
7
+ - "BSD-2-Clause"
8
+ - "BSD-3-Clause"
9
+ - "BSD"
10
+ - "BSD 2-Clause"
11
+ - ISC
12
+ - Ruby
13
+ - ruby
14
+ - "same as ruby's"
15
+ - Zlib
16
+ - "LGPL-2.1*"
17
+ - "LGPL-3.0*"
18
+ - MPL-2.0
19
+ - "Artistic-*"
20
+ - "Brakeman Public Use License"
21
+ - "GPL-2.0*"
22
+ - "GPL-3.0*"
23
+ - GPLv2
24
+ - WTFPL
25
+ - "Prosperity*"
26
+
27
+ require-license: false
28
+ require-known-license: false
data/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## [0.11.0] - 2026-10-07
2
+
3
+ ### Changed
4
+
5
+ - `RSpec/MultipleMemoizedHelpers` disabled
6
+
7
+ ### Fixed
8
+
9
+ - Dependency age check failing on a transient registry error
10
+ - Dependency age check failing on a transient GitHub API error
11
+ - Dependency age check stalling on an unresponsive registry
12
+ - Dependency age check stalling on an unresponsive GitHub API
13
+
14
+ ## [0.10.0] - 2026-10-02
15
+
16
+ ### Added
17
+
18
+ - License compliance verification
19
+
20
+ ### Changed
21
+
22
+ - Gem update pull requests limited to the named gem
23
+ - Minimum release age verification across lockfiles and manifests
24
+ - License check fails at a failed tool install
25
+ - `Style/DisallowDelegate` accepts a constant the object supplies to the collaborator
26
+
1
27
  ## [0.9.0] - 2026-08-31
2
28
 
3
29
  ### Added
data/README.md CHANGED
@@ -61,12 +61,13 @@ Cop names follow RuboCop's empirical convention — a noun phrase describing the
61
61
 
62
62
  ### Stock cops disabled
63
63
 
64
- Where a 4Shark cop supersedes or contradicts a stock cop, `config/default.yml` turns the stock one off:
64
+ Where a 4Shark cop supersedes or contradicts a stock cop, or a stock cop contradicts a 4Shark convention, `config/default.yml` turns the stock one off:
65
65
 
66
66
  | Disabled stock cop | Why |
67
67
  |---|---|
68
68
  | `Rails/Delegate` | contradicts `Style/DisallowDelegate` — it turns an explicit method into `delegate`, we forbid the macro |
69
69
  | `Rails/InverseOf` | superseded by `Rails/MandatoryInverseOf` (covers its cases and more) |
70
+ | `RSpec/MultipleMemoizedHelpers` | contradicts the spec convention of keeping every `let` at the top level, which the cop's default `Max: 5` cannot hold |
70
71
  | `Style/MultilineTernaryOperator` | superseded by `Style/DisallowTernary` — it shapes a construct we forbid outright |
71
72
  | `Style/NestedTernaryOperator` | superseded by `Style/DisallowTernary` — same |
72
73
  | `Style/SafeNavigation` | contradicts `Style/DisallowSafeNavigation` — it pushes `&.`, we forbid it |
data/config/default.yml CHANGED
@@ -106,6 +106,11 @@ RSpec/Dialect:
106
106
  Include:
107
107
  - 'spec/**/*_spec.rb'
108
108
 
109
+ # Stock cop disabled (not superseded by a 4Shark cop): the spec convention keeps
110
+ # every `let` at the top level, which the cop's default `Max: 5` cannot hold.
111
+ RSpec/MultipleMemoizedHelpers:
112
+ Enabled: false
113
+
109
114
  RSpec/InverseOfMatcher:
110
115
  Description: 'Root models must include `.inverse_of` in association specs; subclasses must not.'
111
116
  Enabled: true
@@ -44,10 +44,10 @@ module RuboCop
44
44
  # contributes something the caller would otherwise have to reach in and
45
45
  # take, and the result is a simpler API on the object that owns the data.
46
46
  #
47
- # Own state is an instance variable, `self`, or a receiverless call,
48
- # reached directly, through a wrapper, or through a call on it — `record`,
49
- # `record.owner_id` and `[record.owner_id]` all carry the object's own
50
- # data. A method PARAMETER does not: it arrives as an `lvar`, so a setter
47
+ # Own state is an instance variable, `self`, a receiverless call, or a
48
+ # constant, reached directly, through a wrapper, or through a call on it —
49
+ # `record.owner_id` and `Settings.keep_alive` both carry data the object
50
+ # chose to supply. A method PARAMETER does not: it arrives as an `lvar`, so a setter
51
51
  # handing its argument to a collaborator stays flagged.
52
52
  #
53
53
  # Two limits keep the exemption from swallowing the rule.
@@ -224,8 +224,8 @@ module RuboCop
224
224
  end
225
225
 
226
226
  # A method parameter reaches the body as an `lvar`, so only an instance
227
- # variable, `self`, or a receiverless call counts as the object's own
228
- # state — read directly, through a wrapper, or through a call on it.
227
+ # variable, `self`, a receiverless call, or a constant counts as the
228
+ # object's own state — read directly, through a wrapper, or through a call on it.
229
229
  # Anything rooted at the collaborator is that collaborator's own data
230
230
  # coming back, which is the echo the rule forbids. The first guard
231
231
  # refuses anything that is not a node, which covers both the nil child
@@ -236,6 +236,7 @@ module RuboCop
236
236
  return false if argument == collaborator
237
237
  return true if argument.ivar_type?
238
238
  return true if argument.self_type?
239
+ return true if argument.const_type?
239
240
  return own_state?(argument.receiver, collaborator) if call_with_receiver?(argument)
240
241
  return true if argument.send_type?
241
242
  return argument.children.any? { |child| own_state?(child, collaborator) } if wrapper?(argument)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Fourshark
5
- VERSION = '0.9.0'
5
+ VERSION = '0.11.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-fourshark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Ribeiro
@@ -127,6 +127,7 @@ executables: []
127
127
  extensions: []
128
128
  extra_rdoc_files: []
129
129
  files:
130
+ - ".grant.yaml"
130
131
  - ".ruby-gemset"
131
132
  - ".ruby-version"
132
133
  - CHANGELOG.md