[openstreetmap/openstreetmap-website] Use a custom cop to check controller action names (PR #5533)
Andy Allan
notifications at github.com
Wed Jan 22 13:42:08 UTC 2025
SpecificActionNames cop taken from https://github.com/rubocop/rubocop-rails/pull/827
We're most of the way through renaming our controller actions to follow the resourceful routing conventions. At this point, I think it would be helpful to provide automated feedback to other developers, if they try writing new code that doesn't follow this convention. By using a custom rubocop configuration, we can catch these situations during CI, but also this helps developers who have rubocop integrated into their IDE to receive early feedback while still writing the code.
The todo list of excluded files is currently provided explicitly in `.rubocop.yml`. This is because if you have more than 15 files failing a check, rubocop will instead disable the cop entirely when (re-)generating `.rubocop_todo.yml`, which would defeat the point of adding it.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5533
-- Commit Summary --
* Use a custom cop to check controller action names
-- File Changes --
M .rubocop.yml (40)
A .rubocop/specific_action_names.rb (69)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5533.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5533.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5533
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5533 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250122/f9d6cd09/attachment.htm>
More information about the rails-dev
mailing list