Skip to content

Fix source range for NamespacedClass cop

Chad Woolley requested to merge caw-fix-namespaced-class-cop-for-rubymine into master

What does this MR do and why?

Fixes: Unable to re-generate all RuboCop TODOs (#366292 - closed)

Related: Work around RubyMine usability/productivity pro... (!89590 - merged)

This reverts Work around RubyMine usability/productivity pro... (!89590 - merged) and replaces it with a better approach by rewriting the cop.

Now, the cop only highlights the class name instead of the whole file in RubyMine.

Thank you @brodock for suggesting this approach!

Screenshots

See that only the class name is underlined, and that the other errors in the file are still visible.

Screen_Shot_2022-06-27_at_3.04.59_PM

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chad Woolley

Merge request reports