rubocop-greenroom
rubocop-greenroom reports structural problems that RuboCop can identify from one Ruby file.
Add the plugin to the host application's .rubocop.yml:
plugins:
- rubocop-greenroom
The plugin enables three cops:
Greenroom/ScienceBlockShaperequires oneuse, onetry, and onecomparecall in that order.Greenroom/UnsafeScienceBodyreports unsafereturnandbindingexpressions inuseandtrybodies.Greenroom/CandidateIsPrivatereports a visible same-class candidate definition that is public or protected.
These cops inspect one file. A separate diff checker verifies that a use body preserves the previous method body.