Skip to content

Commit

Permalink
Bump rubocop-shopify from 2.1.0 to 2.4.0 (#776)
Browse files Browse the repository at this point in the history
* 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](Shopify/ruby-style-guide@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] <[email protected]>

* 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 <[email protected]>
  • Loading branch information
dependabot[bot] and vinistock authored Feb 1, 2022
1 parent a56ddf8 commit 5ac6354
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ AllCops:
Include:
- "sorbet/rbi/**/*.rbi"

Naming/InclusiveLanguage:
Exclude:
- "lib/tapioca/compilers/dsl/protobuf.rb"

RSpec/BeforeAfterAll:
Enabled: false

Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/compilers/dsl/aasm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
)

Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/compilers/dsl/active_record_relations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/compilers/symbol_table_compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def filtered_mixin?(mixin_name)

SPECIAL_METHOD_NAMES = T.let([
"!", "~", "+@", "**", "-@", "*", "/", "%", "+", "-", "<<", ">>", "&", "|", "^",
"<", "<=", "=>", ">", ">=", "==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`"
"<", "<=", "=>", ">", ">=", "==", "===", "!=", "=~", "!~", "<=>", "[]", "[]=", "`",
], T::Array[String])

sig { params(name: String).returns(T::Boolean) }
Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/helpers/config_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/rbi_ext/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
)

Expand Down
2 changes: 1 addition & 1 deletion lib/tapioca/trackers/autoload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
2 changes: 1 addition & 1 deletion spec/tapioca/compilers/symbol_table_compiler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ module Foo
def foo
end
end
RUBY
RUBY

add_ruby_file("toto.rb", <<~RUBY)
module Toto
Expand Down
2 changes: 1 addition & 1 deletion tapioca.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5ac6354

Please sign in to comment.