You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bin/rubocop --only Rails/UniqueValidationWithoutIndex -d app/models/concerns/some_concern.rb
For /Users/dteoh/dev/some_project: configuration from /Users/dteoh/dev/some_project/.rubocop.yml
configuration from /Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-performance-1.8.0/config/default.yml
configuration from /Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-performance-1.8.0/config/default.yml
Default configuration from /Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/config/default.yml
configuration from /Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-rails-2.8.0/config/default.yml
configuration from /Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-rails-2.8.0/config/default.yml
Inspecting 1 file
Scanning /Users/dteoh/dev/some_project/app/models/concerns/some_concern.rb
An error occurred while Rails/UniqueValidationWithoutIndex cop was inspecting /Users/dteoh/dev/some_project/app/models/concerns/some_concern.rb:8:4.
undefined method `each_node' for nil:NilClass
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-rails-2.8.0/lib/rubocop/cop/mixin/active_record_helper.rb:14:in `find_set_table_name'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-rails-2.8.0/lib/rubocop/cop/mixin/active_record_helper.rb:35:in `each'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-rails-2.8.0/lib/rubocop/cop/mixin/active_record_helper.rb:35:in `to_a'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-rails-2.8.0/lib/rubocop/cop/mixin/active_record_helper.rb:35:in `table_name'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-rails-2.8.0/lib/rubocop/cop/rails/unique_validation_without_index.rb:49:in `find_schema_information'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-rails-2.8.0/lib/rubocop/cop/rails/unique_validation_without_index.rb:38:in `on_send'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:99:in `block (2 levels) in trigger_responding_cops'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:152:in `with_cop_error_handling'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:98:in `block in trigger_responding_cops'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:97:in `each'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:97:in `trigger_responding_cops'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:70:in `on_send'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-ast-0.4.0/lib/rubocop/ast/traversal.rb:173:in `on_block'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:72:in `on_block'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-ast-0.4.0/lib/rubocop/ast/traversal.rb:59:in `block in on_begin'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-ast-0.4.0/lib/rubocop/ast/traversal.rb:59:in `each'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-ast-0.4.0/lib/rubocop/ast/traversal.rb:59:in `on_begin'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:72:in `on_begin'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-ast-0.4.0/lib/rubocop/ast/traversal.rb:159:in `on_while'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:72:in `on_module'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-ast-0.4.0/lib/rubocop/ast/traversal.rb:14:in `walk'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/commissioner.rb:85:in `investigate'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/team.rb:152:in `investigate_partial'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cop/team.rb:83:in `investigate'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:296:in `inspect_file'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:246:in `block in do_inspection_loop'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:278:in `block in iterate_until_no_changes'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:271:in `loop'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:271:in `iterate_until_no_changes'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:242:in `do_inspection_loop'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:122:in `block in file_offenses'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:147:in `file_offense_cache'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:121:in `file_offenses'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:112:in `process_file'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:91:in `block in each_inspected_file'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:90:in `each'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:90:in `reduce'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:90:in `each_inspected_file'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:79:in `inspect_files'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/runner.rb:40:in `run'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cli/command/execute_runner.rb:22:in `execute_runner'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cli/command/execute_runner.rb:14:in `run'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cli/command.rb:11:in `run'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cli/environment.rb:18:in `run'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cli.rb:65:in `run_command'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cli.rb:72:in `execute_runners'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/lib/rubocop/cli.rb:41:in `run'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/exe/rubocop:13:in `block in <top (required)>'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
/Users/dteoh/.asdf/installs/ruby/2.5.5/lib/ruby/gems/2.5.0/gems/rubocop-0.90.0/exe/rubocop:12:in `<top (required)>'
bin/rubocop:29:in `load'
bin/rubocop:29:in `<main>'
.
1 file inspected, no offenses detected
1 error occurred:
An error occurred while Rails/UniqueValidationWithoutIndex cop was inspecting /Users/dteoh/dev/some_project/app/models/concerns/some_concern.rb:8:4.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop-hq/rubocop/issues
Expected behavior
Ignore the module, or somehow apply the check in the context of the class that includes the module.
Actual behavior
Error occured.
Disabling the check does not work.
Steps to reproduce the problem
Module triggering the bug:
# app/models/concerns/some_concern.rb# frozen_string_literal: true# A test concern to trigger RuboCop bug.moduleSomeConcernextendActiveSupport::Concernincludeddovalidates:a_column,uniqueness: trueendend
Expected behavior
Ignore the module, or somehow apply the check in the context of the class that includes the module.
Actual behavior
Error occured.
Disabling the check does not work.
Steps to reproduce the problem
Module triggering the bug:
RuboCop version
The text was updated successfully, but these errors were encountered: