Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rubocop-shopify from 2.1.0 to 2.4.0 #776

Merged
merged 4 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because of usage of master?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - we can't control the URL used in the docs. Also, I can't use the rubocop:disable comment, otherwise that will show up in our docs, so I just turned it off for the file.


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