From 0539b0d9c262551e4115b1b83b9c8f1b136a03d6 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 7 Jun 2021 06:18:14 +0000 Subject: [PATCH] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../config/default.yml | 29 +++- .../lib/rubocop-sorbet.rb | 0 .../binding_constants_without_type_alias.rb | 0 .../sorbet/callback_conditionals_binding.rb | 138 ++++++++++++++++++ .../cop/sorbet/constants_from_strings.rb | 0 .../sorbet/forbid_include_const_literal.rb | 0 .../sorbet/forbid_superclass_const_literal.rb | 0 .../lib/rubocop/cop/sorbet/forbid_t_unsafe.rb | 26 ++++ .../cop/sorbet/forbid_untyped_struct_props.rb | 0 .../cop/sorbet/one_ancestor_per_line.rb | 0 .../forbid_extend_t_sig_helpers_in_shims.rb | 0 .../rbi/forbid_rbi_outside_of_sorbet_dir.rb | 31 ++++ ...ingle_line_rbi_class_module_definitions.rb | 0 .../cop/sorbet/sigils/enforce_sigil_order.rb | 0 .../rubocop/cop/sorbet/sigils/false_sigil.rb | 0 .../rubocop/cop/sorbet/sigils/has_sigil.rb | 0 .../rubocop/cop/sorbet/sigils/ignore_sigil.rb | 0 .../rubocop/cop/sorbet/sigils/strict_sigil.rb | 0 .../rubocop/cop/sorbet/sigils/strong_sigil.rb | 0 .../rubocop/cop/sorbet/sigils/true_sigil.rb | 0 .../rubocop/cop/sorbet/sigils/valid_sigil.rb | 6 +- .../signatures/allow_incompatible_override.rb | 0 .../signatures/checked_true_in_signature.rb | 0 .../sorbet/signatures/enforce_signatures.rb | 0 .../signatures/keyword_argument_ordering.rb | 0 .../parameters_ordering_in_signature.rb | 0 .../signatures/signature_build_order.rb | 0 .../cop/sorbet/signatures/signature_cop.rb | 0 .../lib/rubocop/cop/sorbet_cops.rb | 8 +- .../lib/rubocop/sorbet.rb | 0 .../lib/rubocop/sorbet/inject.rb | 0 .../lib/rubocop/sorbet/version.rb | 2 +- 33 files changed, 235 insertions(+), 7 deletions(-) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/config/default.yml (84%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop-sorbet.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/constants_from_strings.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_t_unsafe.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet => rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi}/forbid_extend_t_sig_helpers_in_shims.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_sorbet_dir.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet => rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi}/single_line_rbi_class_module_definitions.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/sigils/false_sigil.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/sigils/has_sigil.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/sigils/strict_sigil.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/sigils/strong_sigil.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/sigils/true_sigil.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/signatures/parameters_ordering_in_signature.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet/signatures/signature_cop.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/cop/sorbet_cops.rb (78%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/sorbet.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/sorbet/inject.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{rubocop-sorbet-0.6.1 => rubocop-sorbet-0.6.2}/lib/rubocop/sorbet/version.rb (76%) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index e148f4aa86..ea573d4435 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -83,7 +83,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.16.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.10.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.3.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.1/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.5.1/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.2/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/config/default.yml similarity index 84% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/config/default.yml index 50ed03d75d..8d74b1f044 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/config/default.yml @@ -14,6 +14,11 @@ Sorbet/BindingConstantWithoutTypeAlias: Enabled: true VersionAdded: 0.2.0 +Sorbet/CallbackConditionalsBinding: + Description: 'Ensures callback conditionals are bound to the right type.' + Enabled: true + VersionAdded: 0.7.0 + Sorbet/CheckedTrueInSignature: Description: 'Disallows the usage of `checked(true)` in signatures.' Enabled: true @@ -42,7 +47,7 @@ Sorbet/FalseSigil: Description: 'All files must be at least at strictness `false`.' Enabled: true VersionAdded: 0.3.3 - SuggestedStrictness: true + SuggestedStrictness: "false" Include: - "**/*.rb" - "**/*.rbi" @@ -60,6 +65,13 @@ Sorbet/ForbidExtendTSigHelpersInShims: Include: - "**/*.rbi" +Sorbet/ForbidRBIOutsideOfSorbetDir: + Description: 'Forbids RBI files outside of the sorbet/ directory.' + Enabled: true + VersionAdded: 0.6.1 + Include: + - "**/*.rbi" + Sorbet/ForbidIncludeConstLiteral: Description: 'Forbids include of non-literal constants.' Enabled: false @@ -74,6 +86,12 @@ Sorbet/ForbidSuperclassConstLiteral: Exclude: - db/migrate/*.rb +Sorbet/ForbidTUnsafe: + Description: 'Forbid usage of T.unsafe.' + Enabled: false + VersionAdded: 0.7.0 + VersionChanged: 0.7.0 + Sorbet/ForbidUntypedStructProps: Description: >- Disallows use of `T.untyped` or `T.nilable(T.untyped)` as a @@ -84,11 +102,14 @@ Sorbet/ForbidUntypedStructProps: Sorbet/HasSigil: Description: 'Makes the Sorbet typed sigil mandatory in all files.' Enabled: false + SuggestedStrictness: "false" + MinimumStrictness: "false" VersionAdded: 0.3.3 Sorbet/IgnoreSigil: Description: 'All files must be at least at strictness `ignore`.' Enabled: false + SuggestedStrictness: "ignore" VersionAdded: 0.3.3 Sorbet/KeywordArgumentOrdering: @@ -131,19 +152,25 @@ Sorbet/SingleLineRbiClassModuleDefinitions: Sorbet/StrictSigil: Description: 'All files must be at least at strictness `strict`.' Enabled: false + SuggestedStrictness: "strict" VersionAdded: 0.3.3 Sorbet/StrongSigil: Description: 'All files must be at least at strictness `strong`.' Enabled: false + SuggestedStrictness: "strong" VersionAdded: 0.3.3 Sorbet/TrueSigil: Description: 'All files must be at least at strictness `true`.' Enabled: false + SuggestedStrictness: "true" VersionAdded: 0.3.3 Sorbet/ValidSigil: Description: 'All files must have a valid sigil.' Enabled: true + RequireSigilOnAllFiles: false + SuggestedStrictness: "false" + MinimumStrictness: "false" VersionAdded: 0.3.3 diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop-sorbet.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop-sorbet.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop-sorbet.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop-sorbet.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb new file mode 100644 index 0000000000..e692fe347c --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Sorbet + # This cop ensures that callback conditionals are bound to the right type + # so that they are type checked properly. + # + # @example + # + # # bad + # class Post < ApplicationRecord + # before_create :do_it, if: -> { should_do_it? } + # + # def should_do_it? + # true + # end + # end + # + # # good + # class Post < ApplicationRecord + # before_create :do_it, if: -> { T.bind(self, Post).should_do_it? } + # + # def should_do_it? + # true + # end + # end + class CallbackConditionalsBinding < RuboCop::Cop::Cop + CALLBACKS = %i( + validate + validates + validates_with + before_validation + around_validation + + before_create + before_save + before_destroy + before_update + + after_create + after_save + after_destroy + after_update + after_touch + after_initialize + after_find + + around_create + around_save + around_destroy + around_update + + before_commit + + after_commit + after_create_commit + after_destroy_commit + after_rollback + after_save_commit + after_update_commit + + before_action + prepend_before_action + append_before_action + + around_action + prepend_around_action + append_around_action + + after_action + prepend_after_action + append_after_action + ).freeze + + def autocorrect(node) + lambda do |corrector| + options = node.each_child_node.find(&:hash_type?) + + conditional = nil + options.each_pair do |keyword, block| + if keyword.value == :if || keyword.value == :unless + conditional = block + break + end + end + + _, _, block = conditional.child_nodes + expected_class = node.parent_module_name + + bind = if block.begin_type? + indentation = " " * block.child_nodes.first.loc.column + "T.bind(self, #{expected_class})\n#{indentation}" + elsif block.child_nodes.empty? && !block.ivar_type? + "T.bind(self, #{expected_class})." + else + "T.bind(self, #{expected_class}); " + end + + corrector.insert_before(block, bind) + end + end + + def on_send(node) + return unless CALLBACKS.include?(node.method_name) + + options = node.each_child_node.find(&:hash_type?) + return if options.nil? + + conditional = nil + options.each_pair do |keyword, block| + next unless keyword.sym_type? + + if keyword.value == :if || keyword.value == :unless + conditional = block + break + end + end + + return if conditional.nil? || conditional.child_nodes.empty? + + type, _, block = conditional.child_nodes + return unless type.lambda_or_proc? + + expected_class = node.parent_module_name + return if expected_class.nil? + + unless block.source.include?("T.bind(self, #{expected_class})") + add_offense( + node, + message: "Callback conditionals should be bound to the right type. Use T.bind(self, #{expected_class})" + ) + end + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/constants_from_strings.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/constants_from_strings.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/constants_from_strings.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/constants_from_strings.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_t_unsafe.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_t_unsafe.rb new file mode 100644 index 0000000000..5e10cdd8a6 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_t_unsafe.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +require 'rubocop' + +module RuboCop + module Cop + module Sorbet + # This cop disallows using `T.unsafe` anywhere. + # + # @example + # + # # bad + # T.unsafe(foo) + # + # # good + # foo + class ForbidTUnsafe < RuboCop::Cop::Cop + def_node_matcher(:t_unsafe?, '(send (const nil? :T) :unsafe _)') + + def on_send(node) + add_offense(node, message: "Do not use `T.unsafe`.") if t_unsafe?(node) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/forbid_extend_t_sig_helpers_in_shims.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/forbid_extend_t_sig_helpers_in_shims.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_sorbet_dir.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_sorbet_dir.rb new file mode 100644 index 0000000000..6932a58e3f --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_sorbet_dir.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module Sorbet + # This cop makes sure that RBI files are always located under sorbet/rbi/. + # + # @example + # # bad + # lib/some_file.rbi + # other_file.rbi + # + # # good + # sorbet/rbi/some_file.rbi + # sorbet/rbi/any/path/for/file.rbi + class ForbidRBIOutsideOfSorbetDir < RuboCop::Cop::Cop + include RangeHelp + + PATH_REGEXP = %r{sorbet/rbi} + + def investigate(processed_source) + add_offense( + nil, + location: source_range(processed_source.buffer, 1, 0), + message: "RBI files are only accepted in the sorbet/rbi/ directory." + ) unless processed_source.file_path =~ PATH_REGEXP + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/single_line_rbi_class_module_definitions.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/single_line_rbi_class_module_definitions.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/false_sigil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/false_sigil.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/false_sigil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/false_sigil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/has_sigil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/has_sigil.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/has_sigil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/has_sigil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/strict_sigil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/strict_sigil.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/strict_sigil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/strict_sigil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/strong_sigil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/strong_sigil.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/strong_sigil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/strong_sigil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/true_sigil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/true_sigil.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/true_sigil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/true_sigil.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb index fbcc307ba4..f7b93c3004 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb @@ -147,12 +147,14 @@ module RuboCop # Default is `'false'` def suggested_strictness - STRICTNESS_LEVELS.include?(cop_config['SuggestedStrictness']) ? cop_config['SuggestedStrictness'] : 'false' + config = cop_config['SuggestedStrictness'].to_s + STRICTNESS_LEVELS.include?(config) ? config : 'false' end # Default is `nil` def minimum_strictness - cop_config['MinimumStrictness'] if STRICTNESS_LEVELS.include?(cop_config['MinimumStrictness']) + config = cop_config['MinimumStrictness'].to_s + config if STRICTNESS_LEVELS.include?(config) end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/parameters_ordering_in_signature.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/parameters_ordering_in_signature.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/parameters_ordering_in_signature.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/parameters_ordering_in_signature.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/signature_cop.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/signature_cop.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet/signatures/signature_cop.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet/signatures/signature_cop.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet_cops.rb similarity index 78% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet_cops.rb index ae9006a095..6e6906249d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/cop/sorbet_cops.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/cop/sorbet_cops.rb @@ -1,12 +1,16 @@ # frozen_string_literal: true require_relative 'sorbet/binding_constants_without_type_alias' require_relative 'sorbet/constants_from_strings' -require_relative 'sorbet/forbid_extend_t_sig_helpers_in_shims' require_relative 'sorbet/forbid_superclass_const_literal' require_relative 'sorbet/forbid_include_const_literal' require_relative 'sorbet/forbid_untyped_struct_props' -require_relative 'sorbet/single_line_rbi_class_module_definitions' require_relative 'sorbet/one_ancestor_per_line' +require_relative 'sorbet/callback_conditionals_binding' +require_relative 'sorbet/forbid_t_unsafe' + +require_relative 'sorbet/rbi/forbid_extend_t_sig_helpers_in_shims' +require_relative 'sorbet/rbi/forbid_rbi_outside_of_sorbet_dir' +require_relative 'sorbet/rbi/single_line_rbi_class_module_definitions' require_relative 'sorbet/signatures/allow_incompatible_override' require_relative 'sorbet/signatures/checked_true_in_signature' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/sorbet.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/sorbet.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/sorbet.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/sorbet.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/sorbet/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/sorbet/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/sorbet/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/sorbet/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/sorbet/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/sorbet/version.rb similarity index 76% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/sorbet/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/sorbet/version.rb index 95e81d1189..1fa2887aeb 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib/rubocop/sorbet/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib/rubocop/sorbet/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module RuboCop module Sorbet - VERSION = "0.6.1" + VERSION = "0.6.2" end end