rubocop-sorbet 0.5.1 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/release.yml +23 -0
- data/.github/workflows/ci.yml +26 -0
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +25 -41
- data/README.md +22 -0
- data/Rakefile +12 -16
- data/bin/console +3 -3
- data/bin/rspec +6 -6
- data/bin/rubocop +29 -0
- data/config/default.yml +94 -10
- data/config/rbi.yml +262 -0
- data/dev.yml +1 -1
- data/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb +4 -4
- data/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb +142 -0
- data/lib/rubocop/cop/sorbet/constants_from_strings.rb +1 -1
- data/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb +11 -2
- data/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb +2 -2
- data/lib/rubocop/cop/sorbet/forbid_t_unsafe.rb +26 -0
- data/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb +2 -2
- data/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb +75 -0
- data/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb +53 -0
- data/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb +47 -0
- data/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb +46 -0
- data/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb +6 -6
- data/lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb +63 -0
- data/lib/rubocop/cop/sorbet/sigils/false_sigil.rb +3 -3
- data/lib/rubocop/cop/sorbet/sigils/has_sigil.rb +2 -2
- data/lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb +3 -3
- data/lib/rubocop/cop/sorbet/sigils/strict_sigil.rb +3 -3
- data/lib/rubocop/cop/sorbet/sigils/strong_sigil.rb +3 -3
- data/lib/rubocop/cop/sorbet/sigils/true_sigil.rb +3 -3
- data/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb +10 -8
- data/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb +3 -3
- data/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb +6 -6
- data/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb +30 -21
- data/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb +3 -3
- data/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb +24 -15
- data/lib/rubocop/cop/sorbet/signatures/signature_cop.rb +17 -2
- data/lib/rubocop/cop/sorbet_cops.rb +26 -19
- data/lib/rubocop/sorbet/version.rb +1 -1
- data/lib/rubocop/sorbet.rb +1 -1
- data/lib/rubocop-sorbet.rb +5 -5
- data/manual/cops.md +7 -1
- data/manual/cops_sorbet.md +247 -14
- data/rubocop-sorbet.gemspec +2 -2
- data/service.yml +0 -5
- data/tasks/cops_documentation.rake +60 -62
- metadata +20 -12
- data/.shopify-build/VERSION +0 -1
- data/.shopify-build/rubocop-sorbet.yml +0 -16
- data/lib/rubocop/cop/sorbet/signatures/parameters_ordering_in_signature.rb +0 -70
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd3fcc1ddd15ba9418aeb852d83149b3594fb315c7aa77ab4641c9046466d109
|
4
|
+
data.tar.gz: 2b446c026647ebb8d312e8be0034af253f61dc5ac8903c2b75bf42c11be903fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd23c876c6224baf1a3888c169291b6260286326329d9b48650d1c4113571257837e0fa96d12b4357d4aee62e78b20e1be6373295b0d1e7d065c139e8cf3e25f
|
7
|
+
data.tar.gz: 12c3c8aae878c4474284fd41f79da1f4671399bb8e1f01403fe556d36e25274d951f42771ecd0dfc0c3527686b0f3aa1a0d3a22db9b7287c802adf9c43cbc718
|
data/.github/release.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# release.yml
|
2
|
+
|
3
|
+
changelog:
|
4
|
+
exclude:
|
5
|
+
labels:
|
6
|
+
- dependencies
|
7
|
+
- chore
|
8
|
+
authors:
|
9
|
+
- dependabot
|
10
|
+
categories:
|
11
|
+
- title: 🚧 Breaking Changes
|
12
|
+
labels:
|
13
|
+
- breaking-change
|
14
|
+
- title: ✨ Enhancements
|
15
|
+
labels:
|
16
|
+
- enhancement
|
17
|
+
- feature
|
18
|
+
- title: 🐛 Bug Fixes
|
19
|
+
labels:
|
20
|
+
- bugfix
|
21
|
+
- title: 🛠 Other Changes
|
22
|
+
labels:
|
23
|
+
- "*"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
env:
|
6
|
+
SRB_SKIP_GEM_RBIS: true
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
fail-fast: false
|
13
|
+
matrix:
|
14
|
+
ruby: [ 2.5, 2.6, 2.7, 3.0 ]
|
15
|
+
name: Test Ruby ${{ matrix.ruby }}
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
bundler-cache: true
|
23
|
+
- name: Lint Ruby files
|
24
|
+
run: bin/rubocop
|
25
|
+
- name: Run tests
|
26
|
+
run: bin/rspec
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,33 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop-sorbet (0.
|
5
|
-
rubocop
|
4
|
+
rubocop-sorbet (0.6.3)
|
5
|
+
rubocop (>= 0.90.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
|
11
|
-
|
12
|
-
ice_nine (~> 0.11.0)
|
13
|
-
memoizable (~> 0.4.0)
|
14
|
-
ast (2.4.0)
|
15
|
-
concord (0.1.5)
|
16
|
-
adamantium (~> 0.2.0)
|
17
|
-
equalizer (~> 0.0.9)
|
10
|
+
ast (2.4.2)
|
11
|
+
byebug (11.1.3)
|
18
12
|
diff-lcs (1.3)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
23
|
-
parallel (1.19.1)
|
24
|
-
parser (2.7.1.3)
|
25
|
-
ast (~> 2.4.0)
|
26
|
-
procto (0.0.3)
|
13
|
+
parallel (1.20.1)
|
14
|
+
parser (3.0.1.1)
|
15
|
+
ast (~> 2.4.1)
|
27
16
|
rainbow (3.0.0)
|
28
17
|
rake (13.0.1)
|
29
|
-
regexp_parser (1.
|
30
|
-
rexml (3.2.
|
18
|
+
regexp_parser (2.1.1)
|
19
|
+
rexml (3.2.5)
|
31
20
|
rspec (3.8.0)
|
32
21
|
rspec-core (~> 3.8.0)
|
33
22
|
rspec-expectations (~> 3.8.0)
|
@@ -41,42 +30,37 @@ GEM
|
|
41
30
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
31
|
rspec-support (~> 3.8.0)
|
43
32
|
rspec-support (3.8.2)
|
44
|
-
rubocop (
|
33
|
+
rubocop (1.16.0)
|
45
34
|
parallel (~> 1.10)
|
46
|
-
parser (>=
|
35
|
+
parser (>= 3.0.0.0)
|
47
36
|
rainbow (>= 2.2.2, < 4.0)
|
48
|
-
regexp_parser (>= 1.
|
37
|
+
regexp_parser (>= 1.8, < 3.0)
|
49
38
|
rexml
|
50
|
-
rubocop-ast (>= 0.0
|
39
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
51
40
|
ruby-progressbar (~> 1.7)
|
52
|
-
unicode-display_width (>= 1.4.0, <
|
53
|
-
rubocop-ast (
|
54
|
-
parser (>=
|
55
|
-
rubocop-shopify (1.0
|
56
|
-
rubocop (~>
|
57
|
-
ruby-progressbar (1.
|
58
|
-
|
59
|
-
|
60
|
-
unparser (0.4.7)
|
61
|
-
abstract_type (~> 0.0.7)
|
62
|
-
adamantium (~> 0.2.0)
|
63
|
-
concord (~> 0.1.5)
|
41
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
42
|
+
rubocop-ast (1.7.0)
|
43
|
+
parser (>= 3.0.1.1)
|
44
|
+
rubocop-shopify (2.1.0)
|
45
|
+
rubocop (~> 1.13)
|
46
|
+
ruby-progressbar (1.11.0)
|
47
|
+
unicode-display_width (2.0.0)
|
48
|
+
unparser (0.6.0)
|
64
49
|
diff-lcs (~> 1.3)
|
65
|
-
|
66
|
-
parser (>= 2.6.5)
|
67
|
-
procto (~> 0.0.2)
|
50
|
+
parser (>= 3.0.0)
|
68
51
|
yard (0.9.25)
|
69
52
|
|
70
53
|
PLATFORMS
|
71
54
|
ruby
|
72
55
|
|
73
56
|
DEPENDENCIES
|
57
|
+
byebug
|
74
58
|
rake (>= 12.3.3)
|
75
59
|
rspec
|
76
60
|
rubocop-shopify
|
77
61
|
rubocop-sorbet!
|
78
|
-
unparser
|
62
|
+
unparser (~> 0.6)
|
79
63
|
yard (~> 0.9)
|
80
64
|
|
81
65
|
BUNDLED WITH
|
82
|
-
|
66
|
+
2.2.16
|
data/README.md
CHANGED
@@ -17,6 +17,13 @@ or, if you use `Bundler`, add this line your application's `Gemfile`:
|
|
17
17
|
gem 'rubocop-sorbet', require: false
|
18
18
|
```
|
19
19
|
|
20
|
+
Note: in order to use the [Sorbet/SignatureBuildOrder](https://github.com/Shopify/rubocop-sorbet/blob/master/manual/cops_sorbet.md#sorbetsignaturebuildorder) cop autocorrect feature, it is necessary
|
21
|
+
to install `unparser` in addition to `rubocop-sorbet`.
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
gem "unparser", require: false
|
25
|
+
```
|
26
|
+
|
20
27
|
## Usage
|
21
28
|
|
22
29
|
You need to tell RuboCop to load the Sorbet extension. There are three ways to do this:
|
@@ -53,6 +60,15 @@ RuboCop::RakeTask.new do |task|
|
|
53
60
|
end
|
54
61
|
```
|
55
62
|
|
63
|
+
### Rubocop rules for RBI files
|
64
|
+
|
65
|
+
Put this into your `.rubocop.yml`:
|
66
|
+
|
67
|
+
```yaml
|
68
|
+
inherit_gem:
|
69
|
+
rubocop-sorbet: config/rbi.yml
|
70
|
+
```
|
71
|
+
|
56
72
|
## The Cops
|
57
73
|
All cops are located under [`lib/rubocop/cop/sorbet`](lib/rubocop/cop/sorbet), and contain examples/documentation.
|
58
74
|
|
@@ -87,6 +103,12 @@ bundle exec rake new_cop[Sorbet/NewCopName]
|
|
87
103
|
|
88
104
|
which will create a skeleton cop, a skeleton spec, an entry in the default config file and will require the new cop so that it is properly exported from the gem.
|
89
105
|
|
106
|
+
Don't forget to update the documentation with:
|
107
|
+
|
108
|
+
```sh
|
109
|
+
bundle exec rake generate_cops_documentation
|
110
|
+
```
|
111
|
+
|
90
112
|
## License
|
91
113
|
|
92
114
|
The gem is available as open source under the terms of the [MIT License](https://github.com/Shopify/rubocop-sorbet/blob/master/LICENSE.txt).
|
data/Rakefile
CHANGED
@@ -1,40 +1,36 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require(
|
3
|
+
require("bundler/gem_tasks")
|
4
4
|
|
5
|
-
Dir[
|
5
|
+
Dir["tasks/**/*.rake"].each { |t| load t }
|
6
6
|
|
7
|
-
require
|
8
|
-
require
|
7
|
+
require "rubocop/rake_task"
|
8
|
+
require "rspec/core/rake_task"
|
9
9
|
|
10
10
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
11
|
-
spec.pattern = FileList[
|
11
|
+
spec.pattern = FileList["spec/**/*_spec.rb"]
|
12
12
|
end
|
13
13
|
|
14
|
-
task(default:
|
15
|
-
documentation_syntax_check
|
16
|
-
generate_cops_documentation
|
17
|
-
spec
|
18
|
-
])
|
14
|
+
task(default: [:documentation_syntax_check, :generate_cops_documentation, :spec])
|
19
15
|
|
20
|
-
desc(
|
16
|
+
desc("Generate a new cop with a template")
|
21
17
|
task :new_cop, [:cop] do |_task, args|
|
22
|
-
require
|
18
|
+
require "rubocop"
|
23
19
|
|
24
20
|
cop_name = args.fetch(:cop) do
|
25
|
-
warn
|
21
|
+
warn("usage: bundle exec rake new_cop[Department/Name]")
|
26
22
|
exit!
|
27
23
|
end
|
28
24
|
|
29
25
|
github_user = %x(git config github.user).chop
|
30
|
-
github_user =
|
26
|
+
github_user = "Shopify" if github_user.empty?
|
31
27
|
|
32
28
|
generator = RuboCop::Cop::Generator.new(cop_name, github_user)
|
33
29
|
|
34
30
|
generator.write_source
|
35
31
|
generator.write_spec
|
36
|
-
generator.inject_require(root_file_path:
|
37
|
-
generator.inject_config(config_file_path:
|
32
|
+
generator.inject_require(root_file_path: "lib/rubocop/cop/sorbet_cops.rb")
|
33
|
+
generator.inject_config(config_file_path: "config/default.yml")
|
38
34
|
|
39
35
|
puts generator.todo
|
40
36
|
end
|
data/bin/console
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require "bundler/setup"
|
5
|
+
require "rubocop/sorbet"
|
6
6
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -11,5 +11,5 @@ require 'rubocop/sorbet'
|
|
11
11
|
# require "pry"
|
12
12
|
# Pry.start
|
13
13
|
|
14
|
-
require
|
14
|
+
require "irb"
|
15
15
|
IRB.start(__FILE__)
|
data/bin/rspec
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
13
|
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load(Gem.bin_path(
|
29
|
+
load(Gem.bin_path("rspec-core", "rspec"))
|
data/bin/rubocop
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load(Gem.bin_path("rubocop", "rubocop"))
|
data/config/default.yml
CHANGED
@@ -14,6 +14,12 @@ Sorbet/BindingConstantWithoutTypeAlias:
|
|
14
14
|
Enabled: true
|
15
15
|
VersionAdded: 0.2.0
|
16
16
|
|
17
|
+
Sorbet/CallbackConditionalsBinding:
|
18
|
+
Description: 'Ensures callback conditionals are bound to the right type.'
|
19
|
+
Enabled: false
|
20
|
+
Safe: false
|
21
|
+
VersionAdded: 0.7.0
|
22
|
+
|
17
23
|
Sorbet/CheckedTrueInSignature:
|
18
24
|
Description: 'Disallows the usage of `checked(true)` in signatures.'
|
19
25
|
Enabled: true
|
@@ -33,6 +39,11 @@ Sorbet/EnforceSigilOrder:
|
|
33
39
|
Enabled: true
|
34
40
|
VersionAdded: 0.3.4
|
35
41
|
|
42
|
+
Sorbet/sigils/EnforceSingleSigil:
|
43
|
+
Description: 'Ensures that there is only one Sorbet sigil in a file.'
|
44
|
+
Enabled: true
|
45
|
+
VersionAdded: '<<next>>'
|
46
|
+
|
36
47
|
Sorbet/EnforceSignatures:
|
37
48
|
Description: 'Ensures all methods have a valid signature.'
|
38
49
|
Enabled: false
|
@@ -42,17 +53,30 @@ Sorbet/FalseSigil:
|
|
42
53
|
Description: 'All files must be at least at strictness `false`.'
|
43
54
|
Enabled: true
|
44
55
|
VersionAdded: 0.3.3
|
45
|
-
SuggestedStrictness:
|
56
|
+
SuggestedStrictness: "false"
|
46
57
|
Include:
|
47
|
-
- "**/*.rb"
|
48
|
-
- "**/*.rbi"
|
49
|
-
- "**/*.rake"
|
50
|
-
- "**/*.ru"
|
58
|
+
- "**/*.{rb,rbi,rake,ru}"
|
51
59
|
Exclude:
|
52
60
|
- bin/**/*
|
53
61
|
- db/**/*.rb
|
54
62
|
- script/**/*
|
55
63
|
|
64
|
+
Sorbet/ForbidExtendTSigHelpersInShims:
|
65
|
+
Description: 'Forbid the use of `extend T::Sig` and `extend T::Helpers` in RBI shims'
|
66
|
+
Enabled: true
|
67
|
+
VersionAdded: '0.6.0'
|
68
|
+
Include:
|
69
|
+
- "**/*.rbi"
|
70
|
+
|
71
|
+
Sorbet/ForbidRBIOutsideOfAllowedPaths:
|
72
|
+
Description: 'Forbids RBI files outside of the allowed paths'
|
73
|
+
Enabled: true
|
74
|
+
VersionAdded: 0.6.1
|
75
|
+
AllowedPaths:
|
76
|
+
- "sorbet/rbi/**"
|
77
|
+
Include:
|
78
|
+
- "**/*.rbi"
|
79
|
+
|
56
80
|
Sorbet/ForbidIncludeConstLiteral:
|
57
81
|
Description: 'Forbids include of non-literal constants.'
|
58
82
|
Enabled: false
|
@@ -63,7 +87,15 @@ Sorbet/ForbidSuperclassConstLiteral:
|
|
63
87
|
Description: 'Forbid superclasses which are non-literal constants.'
|
64
88
|
Enabled: false
|
65
89
|
VersionAdded: 0.2.0
|
66
|
-
VersionChanged: 0.
|
90
|
+
VersionChanged: 0.6.1
|
91
|
+
Exclude:
|
92
|
+
- db/migrate/*.rb
|
93
|
+
|
94
|
+
Sorbet/ForbidTUnsafe:
|
95
|
+
Description: 'Forbid usage of T.unsafe.'
|
96
|
+
Enabled: false
|
97
|
+
VersionAdded: 0.7.0
|
98
|
+
VersionChanged: 0.7.0
|
67
99
|
|
68
100
|
Sorbet/ForbidUntypedStructProps:
|
69
101
|
Description: >-
|
@@ -75,12 +107,27 @@ Sorbet/ForbidUntypedStructProps:
|
|
75
107
|
Sorbet/HasSigil:
|
76
108
|
Description: 'Makes the Sorbet typed sigil mandatory in all files.'
|
77
109
|
Enabled: false
|
110
|
+
SuggestedStrictness: "false"
|
111
|
+
MinimumStrictness: "false"
|
78
112
|
VersionAdded: 0.3.3
|
113
|
+
Include:
|
114
|
+
- "**/*.{rb,rbi,rake,ru}"
|
115
|
+
Exclude:
|
116
|
+
- bin/**/*
|
117
|
+
- db/**/*.rb
|
118
|
+
- script/**/*
|
79
119
|
|
80
120
|
Sorbet/IgnoreSigil:
|
81
121
|
Description: 'All files must be at least at strictness `ignore`.'
|
82
122
|
Enabled: false
|
123
|
+
SuggestedStrictness: "ignore"
|
83
124
|
VersionAdded: 0.3.3
|
125
|
+
Include:
|
126
|
+
- "**/*.{rb,rbi,rake,ru}"
|
127
|
+
Exclude:
|
128
|
+
- bin/**/*
|
129
|
+
- db/**/*.rb
|
130
|
+
- script/**/*
|
84
131
|
|
85
132
|
Sorbet/KeywordArgumentOrdering:
|
86
133
|
Description: >-
|
@@ -92,10 +139,10 @@ Sorbet/KeywordArgumentOrdering:
|
|
92
139
|
Enabled: true
|
93
140
|
VersionAdded: 0.2.0
|
94
141
|
|
95
|
-
Sorbet/
|
96
|
-
Description: 'Enforces
|
97
|
-
Enabled:
|
98
|
-
VersionAdded: 0.
|
142
|
+
Sorbet/OneAncestorPerLine:
|
143
|
+
Description: 'Enforces one ancestor per call to requires_ancestor'
|
144
|
+
Enabled: false
|
145
|
+
VersionAdded: '0.6.0'
|
99
146
|
|
100
147
|
Sorbet/SignatureBuildOrder:
|
101
148
|
Description: >-
|
@@ -107,22 +154,59 @@ Sorbet/SignatureBuildOrder:
|
|
107
154
|
Enabled: true
|
108
155
|
VersionAdded: 0.3.0
|
109
156
|
|
157
|
+
Sorbet/SingleLineRbiClassModuleDefinitions:
|
158
|
+
Description: 'Empty class and module definitions in RBI must be on a single line.'
|
159
|
+
Enabled: false
|
160
|
+
VersionAdded: '0.6.0'
|
161
|
+
Include:
|
162
|
+
- "**/*.rbi"
|
163
|
+
|
110
164
|
Sorbet/StrictSigil:
|
111
165
|
Description: 'All files must be at least at strictness `strict`.'
|
112
166
|
Enabled: false
|
167
|
+
SuggestedStrictness: "strict"
|
113
168
|
VersionAdded: 0.3.3
|
169
|
+
Include:
|
170
|
+
- "**/*.{rb,rbi,rake,ru}"
|
171
|
+
Exclude:
|
172
|
+
- bin/**/*
|
173
|
+
- db/**/*.rb
|
174
|
+
- script/**/*
|
114
175
|
|
115
176
|
Sorbet/StrongSigil:
|
116
177
|
Description: 'All files must be at least at strictness `strong`.'
|
117
178
|
Enabled: false
|
179
|
+
SuggestedStrictness: "strong"
|
118
180
|
VersionAdded: 0.3.3
|
181
|
+
Include:
|
182
|
+
- "**/*.{rb,rbi,rake,ru}"
|
183
|
+
Exclude:
|
184
|
+
- bin/**/*
|
185
|
+
- db/**/*.rb
|
186
|
+
- script/**/*
|
119
187
|
|
120
188
|
Sorbet/TrueSigil:
|
121
189
|
Description: 'All files must be at least at strictness `true`.'
|
122
190
|
Enabled: false
|
191
|
+
SuggestedStrictness: "true"
|
123
192
|
VersionAdded: 0.3.3
|
193
|
+
Include:
|
194
|
+
- "**/*.{rb,rbi,rake,ru}"
|
195
|
+
Exclude:
|
196
|
+
- bin/**/*
|
197
|
+
- db/**/*.rb
|
198
|
+
- script/**/*
|
124
199
|
|
125
200
|
Sorbet/ValidSigil:
|
126
201
|
Description: 'All files must have a valid sigil.'
|
127
202
|
Enabled: true
|
203
|
+
RequireSigilOnAllFiles: false
|
204
|
+
SuggestedStrictness: "false"
|
205
|
+
MinimumStrictness: "false"
|
128
206
|
VersionAdded: 0.3.3
|
207
|
+
Include:
|
208
|
+
- "**/*.{rb,rbi,rake,ru}"
|
209
|
+
Exclude:
|
210
|
+
- bin/**/*
|
211
|
+
- db/**/*.rb
|
212
|
+
- script/**/*
|