r7kamura / rubocop_todo_corrector

Auto-correct offenses defined in .rubocop_todo.yml.
MIT License
5 stars 2 forks source link

Fix `describe` command on more than three nested cop class #13

Closed ydah closed 2 years ago

ydah commented 2 years ago

This PR is fixed an error for describe command when more than three nested cop class.

For example, the following error occurs for RSpec/Rails/HaveHttpStatus.

-e:1:in `const_source_location': wrong constant name Rails/HaveHttpStatus (NameError)

Bundler.require; print Object.const_source_location("RuboCop::Cop::RSpec::Rails/HaveHttpStatus").first
                             ^^^^^^^^^^^^^^^^^^^^^^
    from -e:1:in `<main>'
Switched to a new branch 'rubocop-todo-corrector-2785051892'
Aborting commit due to empty commit message.
Error: Process completed with exit code 1.
r7kamura commented 2 years ago

Thanks 👍