[openstreetmap/openstreetmap-website] Use ERB Lint to improve erb templates (#2168)
Andy Allan
notifications at github.com
Wed Mar 6 10:53:57 UTC 2019
[ERB Lint](https://github.com/Shopify/erb-lint) brings a useful amount of linting to our html.erb templates. It also allows us to run rubocop on the code embedded in the templates, which is useful too.
As a proof of concept, I've disabled most of the erb linters and many of the rubocop linters too, and just made whitespace changes. These are trivial but were also drowning out everything else, so it's nice to fix them first.
This adds erblint to the travis config, and updates the contributing guide to refer to it too.
The intention is to work through everything marked TODO in the config file, and fix those issues later. The rubocop-related configurations not marked as TODO are those that the ERB Lint docs suggest disabling permanently.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/2168
-- Commit Summary --
* Whitespace fixes in traces erb files
* Whitespace fixes for site erb files
* Whitespace fixes for notifier erb views
* Whitespace fixes for user_blocks erb files
* Whitespace fixes for users erb files
* Whitespace fixes for issues erb files
* Whitespace fixes for oauth_clients erb files
* Whitespace fixes for errors erb files
* Whitespace fixes for browse erb files
* Whitespace fixes for diary_entry erb files
* Whitespace fixes for layouts erb files
* Whitespace fixes for messages erb files
* Whitespace fixes to various erb files
* Introduce erb-lint for linting erb files
* Add erblint to travis
* Update coding style section of the contribution guide to describe our use of rubocop and erblint
-- File Changes --
A .erb-lint.yml (55)
M .travis.yml (1)
M CONTRIBUTING.md (18)
M Gemfile (1)
M Gemfile.lock (18)
M app/views/browse/_common_details.html.erb (2)
M app/views/browse/_containing_relation.html.erb (3)
M app/views/browse/_relation.html.erb (2)
M app/views/browse/_relation_member.html.erb (6)
M app/views/browse/_way.html.erb (4)
M app/views/browse/changeset.html.erb (12)
M app/views/changeset_comments/_comment.html.erb (5)
M app/views/changesets/_changeset.html.erb (4)
M app/views/diary_entries/_diary_comment.html.erb (2)
M app/views/diary_entries/comments.html.erb (2)
M app/views/diary_entries/edit.html.erb (2)
M app/views/diary_entries/index.html.erb (6)
M app/views/diary_entries/show.html.erb (1)
M app/views/errors/forbidden.html.erb (2)
M app/views/errors/not_found.html.erb (2)
M app/views/export/embed.html.erb (2)
M app/views/geocoder/search.html.erb (2)
M app/views/issues/index.html.erb (4)
M app/views/issues/show.html.erb (4)
M app/views/layouts/_header.html.erb (20)
M app/views/layouts/_search.html.erb (4)
M app/views/layouts/error.html.erb (2)
M app/views/layouts/map.html.erb (6)
M app/views/messages/_message_count.html.erb (3)
M app/views/messages/inbox.html.erb (2)
M app/views/messages/outbox.html.erb (2)
M app/views/notifier/_gpx_description.html.erb (8)
M app/views/notifier/_message_body.html.erb (22)
M app/views/notifier/diary_comment_notification.html.erb (8)
M app/views/notifier/gpx_failure.html.erb (10)
M app/views/notifier/gpx_success.html.erb (4)
M app/views/notifier/message_notification.html.erb (8)
M app/views/oauth_clients/index.html.erb (12)
M app/views/oauth_clients/show.html.erb (14)
M app/views/site/copyright.html.erb (22)
M app/views/site/edit.html.erb (2)
M app/views/site/export.html.erb (2)
M app/views/site/offline.html.erb (2)
M app/views/traces/_trace.html.erb (8)
M app/views/traces/edit.html.erb (6)
M app/views/traces/new.html.erb (2)
M app/views/traces/show.html.erb (6)
M app/views/user_blocks/_block.html.erb (4)
M app/views/user_blocks/_blocks.html.erb (2)
M app/views/user_blocks/new.html.erb (5)
M app/views/user_blocks/not_found.html.erb (2)
M app/views/user_blocks/revoke.html.erb (6)
M app/views/user_blocks/show.html.erb (16)
M app/views/users/_contact.html.erb (11)
M app/views/users/_user.html.erb (12)
M app/views/users/account.html.erb (6)
M app/views/users/confirm.html.erb (2)
M app/views/users/index.html.erb (11)
M app/views/users/lost_password.html.erb (2)
M app/views/users/reset_password.html.erb (4)
M app/views/users/show.html.erb (14)
M app/views/users/terms.html.erb (4)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/2168.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2168.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/2168
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190306/a23a86af/attachment-0001.html>
More information about the rails-dev
mailing list