Merge pull request #13442 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-sorbet-0.6.10
build(deps): bump rubocop-sorbet from 0.6.8 to 0.6.10 in /Library/Homebrew
This commit is contained in:
commit
f587f82ef7
@ -143,7 +143,7 @@ GEM
|
|||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
rubocop-rspec (2.11.1)
|
rubocop-rspec (2.11.1)
|
||||||
rubocop (~> 1.19)
|
rubocop (~> 1.19)
|
||||||
rubocop-sorbet (0.6.8)
|
rubocop-sorbet (0.6.10)
|
||||||
rubocop (>= 0.90.0)
|
rubocop (>= 0.90.0)
|
||||||
ruby-macho (3.0.0)
|
ruby-macho (3.0.0)
|
||||||
ruby-progressbar (1.11.0)
|
ruby-progressbar (1.11.0)
|
||||||
|
|||||||
@ -166,6 +166,11 @@ class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Cop
|
|||||||
def t_unsafe?(param0 = T.unsafe(nil)); end
|
def t_unsafe?(param0 = T.unsafe(nil)); end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Cop
|
||||||
|
def on_send(node); end
|
||||||
|
def t_untyped?(param0 = T.unsafe(nil)); end
|
||||||
|
end
|
||||||
|
|
||||||
class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop
|
class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop
|
||||||
def on_class(node); end
|
def on_class(node); end
|
||||||
def subclass_of_t_struct?(param0 = T.unsafe(nil)); end
|
def subclass_of_t_struct?(param0 = T.unsafe(nil)); end
|
||||||
@ -88,7 +88,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.30.1/lib"
|
|||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.14.2/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.14.2/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.15.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.15.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.11.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.11.1/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.8/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.10/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-3.0.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-3.0.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov_json_formatter-0.1.4/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov_json_formatter-0.1.4/lib"
|
||||||
|
|||||||
@ -97,6 +97,12 @@ Sorbet/ForbidTUnsafe:
|
|||||||
VersionAdded: 0.7.0
|
VersionAdded: 0.7.0
|
||||||
VersionChanged: 0.7.0
|
VersionChanged: 0.7.0
|
||||||
|
|
||||||
|
Sorbet/ForbidTUntyped:
|
||||||
|
Description: 'Forbid usage of T.untyped'
|
||||||
|
Enabled: false
|
||||||
|
VersionAdded: 0.6.9
|
||||||
|
VersionChanged: 0.7.0
|
||||||
|
|
||||||
Sorbet/ForbidUntypedStructProps:
|
Sorbet/ForbidUntypedStructProps:
|
||||||
Description: >-
|
Description: >-
|
||||||
Disallows use of `T.untyped` or `T.nilable(T.untyped)` as a
|
Disallows use of `T.untyped` or `T.nilable(T.untyped)` as a
|
||||||
@ -65,7 +65,7 @@ module RuboCop
|
|||||||
|
|
||||||
def_node_matcher(:generic_parameter_decl_block_call?, <<-PATTERN)
|
def_node_matcher(:generic_parameter_decl_block_call?, <<-PATTERN)
|
||||||
(block
|
(block
|
||||||
(send nil? {:type_template :type_member}) ...
|
(send nil? {:type_template :type_member} ...) ...
|
||||||
)
|
)
|
||||||
PATTERN
|
PATTERN
|
||||||
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "rubocop"
|
||||||
|
|
||||||
|
module RuboCop
|
||||||
|
module Cop
|
||||||
|
module Sorbet
|
||||||
|
# This cop disallows using `T.untyped` anywhere.
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
#
|
||||||
|
# # bad
|
||||||
|
# sig { params(my_argument: T.untyped).void }
|
||||||
|
# def foo(my_argument); end
|
||||||
|
#
|
||||||
|
# # good
|
||||||
|
# sig { params(my_argument: String).void }
|
||||||
|
# def foo(my_argument); end
|
||||||
|
#
|
||||||
|
class ForbidTUntyped < RuboCop::Cop::Cop
|
||||||
|
def_node_matcher(:t_untyped?, "(send (const nil? :T) :untyped)")
|
||||||
|
|
||||||
|
def on_send(node)
|
||||||
|
add_offense(node, message: "Do not use `T.untyped`.") if t_untyped?(node)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -49,7 +49,7 @@ module RuboCop
|
|||||||
protected
|
protected
|
||||||
|
|
||||||
STRICTNESS_LEVELS = ["ignore", "false", "true", "strict", "strong"]
|
STRICTNESS_LEVELS = ["ignore", "false", "true", "strict", "strong"]
|
||||||
SIGIL_REGEX = /#\s+typed:(?:\s+([\w]+))?/
|
SIGIL_REGEX = /^\s*#\s+typed:(?:\s+([\w]+))?/
|
||||||
|
|
||||||
# extraction
|
# extraction
|
||||||
|
|
||||||
@ -7,6 +7,7 @@ require_relative "sorbet/forbid_untyped_struct_props"
|
|||||||
require_relative "sorbet/one_ancestor_per_line"
|
require_relative "sorbet/one_ancestor_per_line"
|
||||||
require_relative "sorbet/callback_conditionals_binding"
|
require_relative "sorbet/callback_conditionals_binding"
|
||||||
require_relative "sorbet/forbid_t_unsafe"
|
require_relative "sorbet/forbid_t_unsafe"
|
||||||
|
require_relative "sorbet/forbid_t_untyped"
|
||||||
require_relative "sorbet/type_alias_name"
|
require_relative "sorbet/type_alias_name"
|
||||||
|
|
||||||
require_relative "sorbet/rbi/forbid_extend_t_sig_helpers_in_shims"
|
require_relative "sorbet/rbi/forbid_extend_t_sig_helpers_in_shims"
|
||||||
@ -1,6 +1,6 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
module RuboCop
|
module RuboCop
|
||||||
module Sorbet
|
module Sorbet
|
||||||
VERSION = "0.6.8"
|
VERSION = "0.6.10"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user