rubocop-sorbet 0.9.0 → 0.10.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 +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/Gemfile.lock +10 -9
- data/README.md +2 -0
- data/config/default.yml +1 -0
- data/config/rbi.yml +0 -3
- data/lib/rubocop/sorbet/plugin.rb +5 -3
- data/lib/rubocop/sorbet/version.rb +1 -1
- data/lib/rubocop/sorbet.rb +1 -1
- data/lib/rubocop-sorbet.rb +1 -1
- data/manual/cops_sorbet.md +6 -0
- data/rubocop-sorbet.gemspec +0 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc64043160fbb424294446cc5433eb9134d6b4dec111f858dcd759d3e2bd3b10
|
4
|
+
data.tar.gz: 9f1f4fbacdcf92361cad0e52f5de2301b50ce6ac6d14c026a7508bd82f69e4bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd751a32647db87a95f58e8ec04ad2bd21042d527f85c228abb327255e9f7a5c0ae40206b3f228d6eb4a162a91910c4215339fb19613e9c81700f11a745e032
|
7
|
+
data.tar.gz: 9e3dfc82ca705a74c52e6a8345b5e986bc0e66e8bedeb10f5d0ba4e65fa86e82afcd96e3eca41fb336ad903935e850f60335b346f9305f6b56fd97c9e4953ffd
|
data/.github/workflows/ci.yml
CHANGED
@@ -38,7 +38,7 @@ jobs:
|
|
38
38
|
# to a directory that doesn't contain any .rb or .rbi files.
|
39
39
|
- name: Validate default config
|
40
40
|
run: |
|
41
|
-
bin/rubocop --config config/rbi.yml config
|
41
|
+
bin/rubocop --plugin rubocop-sorbet --config config/rbi.yml config
|
42
42
|
bin/rubocop --config config/default.yml config -r rubocop-sorbet
|
43
43
|
- name: Lint Ruby files
|
44
44
|
run: bin/rubocop
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop-sorbet (0.
|
5
|
-
lint_roller (~> 1.1)
|
4
|
+
rubocop-sorbet (0.10.0)
|
6
5
|
rubocop (>= 1)
|
7
6
|
|
8
7
|
GEM
|
9
8
|
remote: https://rubygems.org/
|
10
9
|
specs:
|
11
|
-
ast (2.4.
|
10
|
+
ast (2.4.3)
|
12
11
|
date (3.4.1)
|
13
12
|
debug (1.10.0)
|
14
13
|
irb (~> 1.10)
|
@@ -18,13 +17,14 @@ GEM
|
|
18
17
|
irb (1.14.3)
|
19
18
|
rdoc (>= 4.0.0)
|
20
19
|
reline (>= 0.4.2)
|
21
|
-
json (2.10.
|
20
|
+
json (2.10.2)
|
22
21
|
language_server-protocol (3.17.0.4)
|
23
22
|
lint_roller (1.1.0)
|
24
23
|
parallel (1.26.3)
|
25
|
-
parser (3.3.7.
|
24
|
+
parser (3.3.7.4)
|
26
25
|
ast (~> 2.4.1)
|
27
26
|
racc
|
27
|
+
prism (1.4.0)
|
28
28
|
psych (5.2.2)
|
29
29
|
date
|
30
30
|
stringio
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
50
|
rspec-support (~> 3.13.0)
|
51
51
|
rspec-support (3.13.1)
|
52
|
-
rubocop (1.
|
52
|
+
rubocop (1.75.1)
|
53
53
|
json (~> 2.3)
|
54
54
|
language_server-protocol (~> 3.17.0.2)
|
55
55
|
lint_roller (~> 1.1.0)
|
@@ -57,11 +57,12 @@ GEM
|
|
57
57
|
parser (>= 3.3.0.2)
|
58
58
|
rainbow (>= 2.2.2, < 4.0)
|
59
59
|
regexp_parser (>= 2.9.3, < 3.0)
|
60
|
-
rubocop-ast (>= 1.
|
60
|
+
rubocop-ast (>= 1.43.0, < 2.0)
|
61
61
|
ruby-progressbar (~> 1.7)
|
62
62
|
unicode-display_width (>= 2.4.0, < 4.0)
|
63
|
-
rubocop-ast (1.
|
64
|
-
parser (>= 3.3.
|
63
|
+
rubocop-ast (1.43.0)
|
64
|
+
parser (>= 3.3.7.2)
|
65
|
+
prism (~> 1.4)
|
65
66
|
rubocop-shopify (2.15.1)
|
66
67
|
rubocop (~> 1.51)
|
67
68
|
ruby-progressbar (1.13.0)
|
data/README.md
CHANGED
@@ -62,6 +62,8 @@ To enable the cops related to RBI files under the `sorbet/rbi/` directory, put t
|
|
62
62
|
inherit_gem:
|
63
63
|
rubocop-sorbet: config/rbi.yml
|
64
64
|
```
|
65
|
+
> [!NOTE]
|
66
|
+
> If your top-level `.rubocop.yml` does not load `rubocop-sorbet`, you might need to also add a `require: rubocop-sorbet` or `plugins: rubocop-sorbet` to the `sorbet/rbi/.rubocop.yml` file at the top.
|
65
67
|
|
66
68
|
This will turn off default cops for `**/*.rbi` files and enable the RBI specific cops.
|
67
69
|
|
data/config/default.yml
CHANGED
data/config/rbi.yml
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
rubocop_min_version = Gem::Version.create("1.72.1")
|
4
|
+
rubocop_version = Gem::Version.create(RuboCop::Version.version)
|
5
|
+
|
6
|
+
return if rubocop_version < rubocop_min_version
|
7
|
+
|
3
8
|
require "rubocop"
|
4
9
|
require "lint_roller"
|
5
10
|
require "pathname"
|
@@ -8,9 +13,6 @@ module RuboCop
|
|
8
13
|
module Sorbet
|
9
14
|
# A plugin that integrates RuboCop Sorbet with RuboCop's plugin system.
|
10
15
|
class Plugin < LintRoller::Plugin
|
11
|
-
RUBOCOP_MIN_VERSION = "1.72.1"
|
12
|
-
SUPPORTED = Gem::Version.create(RuboCop::Version.version) < RUBOCOP_MIN_VERSION
|
13
|
-
|
14
16
|
def about
|
15
17
|
LintRoller::About.new(
|
16
18
|
name: "rubocop-sorbet",
|
data/lib/rubocop/sorbet.rb
CHANGED
@@ -10,7 +10,7 @@ module RuboCop
|
|
10
10
|
module Sorbet
|
11
11
|
class Error < StandardError; end
|
12
12
|
|
13
|
-
unless Plugin
|
13
|
+
unless defined?(::RuboCop::Sorbet::Plugin)
|
14
14
|
PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
|
15
15
|
CONFIG_DEFAULT = PROJECT_ROOT.join("config", "default.yml").freeze
|
16
16
|
CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
|
data/lib/rubocop-sorbet.rb
CHANGED
@@ -6,7 +6,7 @@ require_relative "rubocop/sorbet"
|
|
6
6
|
require_relative "rubocop/sorbet/version"
|
7
7
|
require_relative "rubocop/sorbet/plugin"
|
8
8
|
|
9
|
-
unless RuboCop::Sorbet::Plugin
|
9
|
+
unless defined?(RuboCop::Sorbet::Plugin)
|
10
10
|
require_relative "rubocop/sorbet/inject"
|
11
11
|
RuboCop::Sorbet::Inject.defaults!
|
12
12
|
end
|
data/manual/cops_sorbet.md
CHANGED
@@ -254,6 +254,12 @@ You can configure the placeholders used by changing the following options:
|
|
254
254
|
* `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped')
|
255
255
|
* `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped')
|
256
256
|
|
257
|
+
### Configurable attributes
|
258
|
+
|
259
|
+
Name | Default value | Configurable values
|
260
|
+
--- | --- | ---
|
261
|
+
AllowRBS | `false` | Boolean
|
262
|
+
|
257
263
|
## Sorbet/EnforceSingleSigil
|
258
264
|
|
259
265
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
|
data/rubocop-sorbet.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ufuk Kayserilioglu
|
@@ -10,22 +10,8 @@ authors:
|
|
10
10
|
- Peter Zhu
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-
|
13
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: lint_roller
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - "~>"
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '1.1'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
requirements:
|
26
|
-
- - "~>"
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: '1.1'
|
29
15
|
- !ruby/object:Gem::Dependency
|
30
16
|
name: rubocop
|
31
17
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
140
|
- !ruby/object:Gem::Version
|
155
141
|
version: '0'
|
156
142
|
requirements: []
|
157
|
-
rubygems_version: 3.6.
|
143
|
+
rubygems_version: 3.6.6
|
158
144
|
specification_version: 4
|
159
145
|
summary: Automatic Sorbet code style checking tool.
|
160
146
|
test_files: []
|