-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint ERB files via HoundCI #2982
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always for this kind of thing!
I'm not sure if we also want to lint all the current files. It's a lot of work and we could ask some help to the But honestly I'm more worried about breaking the commits history making git blame on specific lines more complex, do you think it's worth it? |
I personally think it's worth some short-term pain to increase the friendliness and quality of our ERB templates. Of course, it seems that you're the one doing most of the work, so it's up to you. 😉 I don't mind adding to the Git history, but other people might feel differently. |
@kennyadsl I'm all for opportunistic refactoring, so I wouldn't fix current files all in one go as it's a lot of work. Instead, let's fix issues as they arise, what do you think? |
Yes, probably that's the best option, considering also that our admin UI could need a look and feed refresh sooner or later and we'd touch those files anyway. |
My two cents: I think the best approach when fixing linting issues is to tackle one folder per PR. For example: under |
Ok, considering the feedback received (if linting on existing files needs to happen we need one or more separate PRs) I think this PR is ready to accept reviews :) |
a07bcfc
to
f3a2003
Compare
@@ -1,3 +1,10 @@ | |||
<% some_data = '[1,2,3,]' %> | |||
<%some_data%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 1 space after <%
instead of 0 space.
Use 1 space before %>
instead of 0 space.
I've removed the link to the |
I'm still completely in support of this getting merged. |
Now that Hound supports ERB linting I think it's a good idea to start using that linter in Solidus.
Linting is done with this tool: https://github.com/Shopify/erb-lint
Since we are already linting Ruby code with Rubocop I configured hound to use the same rules that we have for the rest of the application.See #2982 (comment)What do you think?