From 5ac6354049243bc75f1afe971a7d032d81d23e8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 10:40:35 -0500 Subject: [PATCH] Bump rubocop-shopify from 2.1.0 to 2.4.0 (#776) * Bump rubocop-shopify from 2.1.0 to 2.4.0 Bumps [rubocop-shopify](https://github.com/Shopify/ruby-style-guide) from 2.1.0 to 2.4.0. - [Release notes](https://github.com/Shopify/ruby-style-guide/releases) - [Commits](https://github.com/Shopify/ruby-style-guide/compare/v2.1.0...v2.4.0) --- updated-dependencies: - dependency-name: rubocop-shopify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Upgrade i18n * Disable language cop for protobuf since we don't control the URL * Auto-correct style offenses Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Vinicius Stock --- .rubocop.yml | 4 ++++ Gemfile.lock | 6 +++--- lib/tapioca/compilers/dsl/aasm.rb | 2 +- lib/tapioca/compilers/dsl/active_record_relations.rb | 2 +- .../dsl/helpers/active_record_column_type_helper.rb | 2 +- lib/tapioca/compilers/symbol_table_compiler.rb | 2 +- lib/tapioca/helpers/config_helper.rb | 2 +- lib/tapioca/rbi_ext/model.rb | 2 +- lib/tapioca/trackers/autoload.rb | 2 +- spec/tapioca/compilers/symbol_table_compiler_spec.rb | 2 +- tapioca.gemspec | 2 +- 11 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 98c7e90ff..7dfe77f40 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,10 @@ AllCops: Include: - "sorbet/rbi/**/*.rbi" +Naming/InclusiveLanguage: + Exclude: + - "lib/tapioca/compilers/dsl/protobuf.rb" + RSpec/BeforeAfterAll: Enabled: false diff --git a/Gemfile.lock b/Gemfile.lock index d81ebe685..6641063c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -149,7 +149,7 @@ GEM globalid (1.0.0) activesupport (>= 5.0) google-protobuf (3.19.4) - i18n (1.9.0) + i18n (1.9.1) concurrent-ruby (~> 1.0) identity_cache (1.1.0) activerecord (>= 5.2) @@ -249,8 +249,8 @@ GEM rubocop (>= 1.0) rubocop-rspec (2.8.0) rubocop (~> 1.19) - rubocop-shopify (2.1.0) - rubocop (~> 1.13) + rubocop-shopify (2.4.0) + rubocop (~> 1.24) rubocop-sorbet (0.6.5) rubocop (>= 0.90.0) ruby-progressbar (1.11.0) diff --git a/lib/tapioca/compilers/dsl/aasm.rb b/lib/tapioca/compilers/dsl/aasm.rb index 419cf9cc7..24f615456 100644 --- a/lib/tapioca/compilers/dsl/aasm.rb +++ b/lib/tapioca/compilers/dsl/aasm.rb @@ -45,7 +45,7 @@ class AASM < Tapioca::Compilers::Dsl::Base EVENT_CALLBACKS = T.let( ["after", "after_commit", "after_transaction", "before", "before_transaction", "ensure", "error", - "before_success", "success"].freeze, + "before_success", "success",].freeze, T::Array[String] ) diff --git a/lib/tapioca/compilers/dsl/active_record_relations.rb b/lib/tapioca/compilers/dsl/active_record_relations.rb index 21c648f91..240e4ee20 100644 --- a/lib/tapioca/compilers/dsl/active_record_relations.rb +++ b/lib/tapioca/compilers/dsl/active_record_relations.rb @@ -402,7 +402,7 @@ def create_collection_proxy_methods(klass) # `T.any(Model, Integer, String, T::Enumerable[T.any(Model, Integer, String, T::Enumerable[Model])])` model_or_id_collection = "T.any(#{constant_name}, Integer, String" \ - ", T::Enumerable[T.any(#{constant_name}, Integer, String, T::Enumerable[#{constant_name}])])" + ", T::Enumerable[T.any(#{constant_name}, Integer, String, T::Enumerable[#{constant_name}])])" COLLECTION_PROXY_METHODS.each do |method_name| case method_name diff --git a/lib/tapioca/compilers/dsl/helpers/active_record_column_type_helper.rb b/lib/tapioca/compilers/dsl/helpers/active_record_column_type_helper.rb index 97446c827..2d994ff4f 100644 --- a/lib/tapioca/compilers/dsl/helpers/active_record_column_type_helper.rb +++ b/lib/tapioca/compilers/dsl/helpers/active_record_column_type_helper.rb @@ -64,7 +64,7 @@ def type_for(column_name) sig { params(constant: Module).returns(T::Boolean) } def do_not_generate_strong_types?(constant) Object.const_defined?(:StrongTypeGeneration) && - !(constant.singleton_class < Object.const_get(:StrongTypeGeneration)) + !(constant.singleton_class < Object.const_get(:StrongTypeGeneration)) end sig { params(type: String).returns(String) } diff --git a/lib/tapioca/compilers/symbol_table_compiler.rb b/lib/tapioca/compilers/symbol_table_compiler.rb index 2062280c8..d0b93734e 100644 --- a/lib/tapioca/compilers/symbol_table_compiler.rb +++ b/lib/tapioca/compilers/symbol_table_compiler.rb @@ -608,7 +608,7 @@ def filtered_mixin?(mixin_name) SPECIAL_METHOD_NAMES = T.let([ "!", "~", "+@", "**", "-@", "*", "/", "%", "+", "-", "<<", ">>", "&", "|", "^", - "<", "<=", "=>", ">", ">=", "==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`" + "<", "<=", "=>", ">", ">=", "==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`", ], T::Array[String]) sig { params(name: String).returns(T::Boolean) } diff --git a/lib/tapioca/helpers/config_helper.rb b/lib/tapioca/helpers/config_helper.rb index 127259637..3c31ee63a 100644 --- a/lib/tapioca/helpers/config_helper.rb +++ b/lib/tapioca/helpers/config_helper.rb @@ -123,7 +123,7 @@ def validate_config_options(command_options, config_key, config_options) end error_msg = "invalid value for option `#{config_option_key}` for key `#{config_key}` - expected " \ - "`#{command_option.type.capitalize}` but found #{config_option_value_type.capitalize}" + "`#{command_option.type.capitalize}` but found #{config_option_value_type.capitalize}" next build_error(error_msg) unless config_option_value_type == command_option.type end.compact end diff --git a/lib/tapioca/rbi_ext/model.rb b/lib/tapioca/rbi_ext/model.rb index 974fd34af..a7a9b1c51 100644 --- a/lib/tapioca/rbi_ext/model.rb +++ b/lib/tapioca/rbi_ext/model.rb @@ -132,7 +132,7 @@ def create_method(name, parameters: [], return_type: "T.untyped", class_method: SPECIAL_METHOD_NAMES = T.let( ["!", "~", "+@", "**", "-@", "*", "/", "%", "+", "-", "<<", ">>", "&", "|", "^", "<", "<=", "=>", ">", ">=", - "==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`"].freeze, + "==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`",].freeze, T::Array[String] ) diff --git a/lib/tapioca/trackers/autoload.rb b/lib/tapioca/trackers/autoload.rb index 78c52e488..f1eca5714 100644 --- a/lib/tapioca/trackers/autoload.rb +++ b/lib/tapioca/trackers/autoload.rb @@ -6,7 +6,7 @@ module Trackers module Autoload extend T::Sig - NOOP_METHOD = -> (*_args, **_kwargs, &_block) {} + NOOP_METHOD = ->(*_args, **_kwargs, &_block) {} @constant_names_registered_for_autoload = T.let([], T::Array[String]) diff --git a/spec/tapioca/compilers/symbol_table_compiler_spec.rb b/spec/tapioca/compilers/symbol_table_compiler_spec.rb index 9350a4e32..9bf2bb10c 100644 --- a/spec/tapioca/compilers/symbol_table_compiler_spec.rb +++ b/spec/tapioca/compilers/symbol_table_compiler_spec.rb @@ -954,7 +954,7 @@ module Foo def foo end end - RUBY + RUBY add_ruby_file("toto.rb", <<~RUBY) module Toto diff --git a/tapioca.gemspec b/tapioca.gemspec index c675ec4a8..bac516e54 100644 --- a/tapioca.gemspec +++ b/tapioca.gemspec @@ -26,8 +26,8 @@ Gem::Specification.new do |spec| spec.add_dependency("bundler", ">= 1.17.3") spec.add_dependency("pry", ">= 0.12.2") spec.add_dependency("rbi", "~> 0.0.0", ">= 0.0.9") - spec.add_dependency("sorbet-static", ">= 0.5.9204") spec.add_dependency("sorbet-runtime", ">= 0.5.9204") + spec.add_dependency("sorbet-static", ">= 0.5.9204") spec.add_dependency("spoom", "~> 1.1.0", ">= 1.1.4") spec.add_dependency("thor", ">= 1.2.0") spec.add_dependency("yard-sorbet")