[openstreetmap/openstreetmap-website] Add yalphabetize for yaml normalisation (PR #3459)
Sam Jenkins
notifications at github.com
Tue Feb 15 13:53:14 UTC 2022
Thanks for the feedback @tomhughes
Do you think there is much advantage in having the rails translations at the top? Personally I see more usability in alphabetical ordering than categorised ordering; alphabetical ordering is objective whereas a categorised ordering is subjective and does not make it completely clear where a particular key might be found. For example, a developer has no reason to expect `datetime` at line 185 as opposed to earlier in the file.
I think also, the ability to easily spot duplicate keys is a great advantage of alphabetisation of these large files.
With regards CI, I agree that it would be best practice to ensure alphabetisation before submitting a PR in the same way that we would want to lint with Rubocop before submitting a PR. Probably warrants a mention on the `CONTRIBUTION.md` that developers are able to execute using `bundle exec yalphabetize` with the `-a` tag for autocorrecting behaviour.
As always, keen to hear any thoughts/counterarguments 👍
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3459#issuecomment-1040300800
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3459/c1040300800 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220215/8c6de5e5/attachment-0001.htm>
More information about the rails-dev
mailing list