rubocop-sorbet 0.6.8 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb +1 -1
- data/lib/rubocop/cop/sorbet/forbid_t_untyped.rb +29 -0
- data/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb +1 -1
- data/lib/rubocop/cop/sorbet_cops.rb +1 -0
- data/lib/rubocop/sorbet/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0ecbebf2964b6ed70b3afb61766ab16e0008eb639a30ba8672991b6d6d6347b
|
4
|
+
data.tar.gz: ac96a86a59ecb5e9d5ed0130583f1b25095c481a81fe7401febc2291c6637d54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efe418f824b02888f8ef7ba71df10487547b4a9d979f25cf1abd7911729caddbabd0206ca3503acfa7663f0ebd61cb6f4030f2750e9e77398abaf4f8c2991573
|
7
|
+
data.tar.gz: fe962280fb970c51b2c5b755d1b3f644c1a7345193a92eb1c4d9c72a8a8708fc3e3babbe1f69806377d58d968a926388e5f5ba5aa46df0602b4e3cbb4e833c39
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rubocop"
|
4
|
+
|
5
|
+
module RuboCop
|
6
|
+
module Cop
|
7
|
+
module Sorbet
|
8
|
+
# This cop disallows using `T.untyped` anywhere.
|
9
|
+
#
|
10
|
+
# @example
|
11
|
+
#
|
12
|
+
# # bad
|
13
|
+
# sig { params(my_argument: T.untyped).void }
|
14
|
+
# def foo(my_argument); end
|
15
|
+
#
|
16
|
+
# # good
|
17
|
+
# sig { params(my_argument: String).void }
|
18
|
+
# def foo(my_argument); end
|
19
|
+
#
|
20
|
+
class ForbidTUntyped < RuboCop::Cop::Cop
|
21
|
+
def_node_matcher(:t_untyped?, "(send (const nil? :T) :untyped)")
|
22
|
+
|
23
|
+
def on_send(node)
|
24
|
+
add_offense(node, message: "Do not use `T.untyped`.") if t_untyped?(node)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -7,6 +7,7 @@ require_relative "sorbet/forbid_untyped_struct_props"
|
|
7
7
|
require_relative "sorbet/one_ancestor_per_line"
|
8
8
|
require_relative "sorbet/callback_conditionals_binding"
|
9
9
|
require_relative "sorbet/forbid_t_unsafe"
|
10
|
+
require_relative "sorbet/forbid_t_untyped"
|
10
11
|
require_relative "sorbet/type_alias_name"
|
11
12
|
|
12
13
|
require_relative "sorbet/rbi/forbid_extend_t_sig_helpers_in_shims"
|
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.6.
|
4
|
+
version: 0.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ufuk Kayserilioglu
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-
|
14
|
+
date: 2022-06-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- lib/rubocop/cop/sorbet/forbid_include_const_literal.rb
|
92
92
|
- lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb
|
93
93
|
- lib/rubocop/cop/sorbet/forbid_t_unsafe.rb
|
94
|
+
- lib/rubocop/cop/sorbet/forbid_t_untyped.rb
|
94
95
|
- lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb
|
95
96
|
- lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb
|
96
97
|
- lib/rubocop/cop/sorbet/one_ancestor_per_line.rb
|
@@ -145,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
146
|
- !ruby/object:Gem::Version
|
146
147
|
version: '0'
|
147
148
|
requirements: []
|
148
|
-
rubygems_version: 3.
|
149
|
+
rubygems_version: 3.3.3
|
149
150
|
signing_key:
|
150
151
|
specification_version: 4
|
151
152
|
summary: Automatic Sorbet code style checking tool.
|