hound icon indicating copy to clipboard operation
hound copied to clipboard

Hound's HAML linter should support custom Ruby styles for RuboCop

Open gylaz opened this issue 9 years ago • 8 comments

HAML-Lint supports RuboCop's configuration when RuboCop linter is enabled. Hound's implementation doesn't support custom Ruby styles. It should for parity.

gylaz avatar May 04 '16 00:05 gylaz

+1 for this. This has been causing us numerous issues for a few months now.

bensaufley avatar May 11 '16 15:05 bensaufley

+1

cguillemette avatar Jun 15 '16 19:06 cguillemette

What's the word here? Until this is fixed, or some method for specifying Ruby version for HAML is implemented at least, HAML linting straight-up won't work for a lot of people. More people all the time, as they upgrade their environments and take advantage of newer things like the safe navigation operator.

bensaufley avatar Feb 12 '17 05:02 bensaufley

We haven't made any progress on this, and I don't have an ETA but it's not high on our priorities right now.

I'd like to add that we advocate avoiding Ruby code in views (as much as possible), preferring helpers/presenters instead. Thus, for the most part RuboCop linting isn't as important as catching HAML syntax and style issues. I realize that Ruby still gets written in views -- heavier on some projects than others -- so it's still important to support RuboCop, and we'll support this eventually (perhaps even sooner than I think).

gylaz avatar Feb 12 '17 22:02 gylaz

I agree that one should avoid filling one's views with Ruby, but as it stands, a single instance of could_be_nil&.attribute will break Hound for the view. It won't continue linting the file because it no longer understands the context.

bensaufley avatar Feb 12 '17 22:02 bensaufley

Seems related to #1499

benreyn avatar May 04 '18 14:05 benreyn

@gylaz is this already being done?

salbertson avatar Oct 18 '18 19:10 salbertson

I don't believe so.

gylaz avatar Oct 19 '18 16:10 gylaz