[openstreetmap/openstreetmap-website] Prefer keyword arguments when method has optional boolean arguments (#2955)
Andy Allan
notifications at github.com
Wed Nov 11 16:33:42 UTC 2020
This PR fixes some cases where we are using optional boolean parameters, to use keyword arguments instead.
I think this is particularly useful where the method definition lies elsewhere, since it's not obvious what an isolated 'true' or 'false' means.
https://docs.rubocop.org/rubocop/1.0/cops_style.html#styleoptionalbooleanparameter
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/2955
-- Commit Summary --
* Prefer keyword arguments when method has optional boolean arguments
* Prefer keyword arguments when method has optional boolean arguments
-- File Changes --
M .rubocop_todo.yml (6)
M app/controllers/api/notes_controller.rb (4)
M app/controllers/application_controller.rb (10)
M app/controllers/browse_controller.rb (2)
M app/controllers/changeset_comments_controller.rb (2)
M app/controllers/changesets_controller.rb (2)
M app/controllers/users_controller.rb (2)
M app/helpers/browse_helper.rb (2)
M app/views/browse/changeset.html.erb (6)
M test/helpers/browse_helper_test.rb (16)
M test/models/diary_entry_test.rb (16)
M test/models/trace_test.rb (14)
M test/models/tracetag_test.rb (20)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/2955.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2955.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2955
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20201111/9e6b5338/attachment.htm>
More information about the rails-dev
mailing list