docs: update usage of rubocop-rails integration#99
docs: update usage of rubocop-rails integration#99tnir wants to merge 2 commits intorubyatscale:mainfrom
Conversation
cf. rubocop/rubocop-rails PR 1476 Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com> Signed-off-by: Takuya N <takninnovationresearch@gmail.com>
|
@alexevanczuk What do you think? |
dduugg
left a comment
There was a problem hiding this comment.
Thanks for the docs update — the old instructions were misleading for anyone on a modern version of rubocop-rails, so this is a welcome improvement.
A few things worth addressing before merging:
Grammar fix (required):
"If you has your own custom cop" → "If you have your own custom cop"
Suggestion — add context for the version requirement:
The new text says "Use rubocop-rails 2.32.0 or higher" but doesn't explain why. A brief note would help readers understand without having to follow the linked PR. For example:
Version 2.32.0+ includes native support for pack paths, so built-in cops no longer require manual
Includeoverrides.
Suggestion — clarify the example cop names:
Custom/CustomCopOne and Custom/CustomCopTwo are reasonable placeholders, but the Custom namespace may confuse readers. Consider using something like YourOrg/CustomCop or adding a comment like # Replace with your custom cop name to make the intent clearer.
Per updating the native support of engines and Packwerk in rubocop/rubocop-rails#1476, users can use rubocop-rails out of the box, in general. They might need to tweak their own RuboCop config for their own custom Cops.