Skip to content
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

False positive für implicit div sniff #40

Closed
oliverklee opened this issue Nov 4, 2014 · 8 comments
Closed

False positive für implicit div sniff #40

oliverklee opened this issue Nov 4, 2014 · 8 comments

Comments

@oliverklee
Copy link
Contributor

The code in https://gist.github.com/oliverklee/1fdfaa5b4d699cfd31d9 creates the following warning with haml-lint 0.7.0:

app/views/devise/unlocks/new.html.haml:14 [W] ImplicitDiv: `%div` can be written as `.submit` since `%div` is implicit

This is the corresponding line:

%div= f.submit 'Resend unlock instructions'

The warning is incorrect because the code after the div isn't a ".submit class", but a "f.submit tag".

@sds
Copy link
Owner

sds commented Nov 11, 2014

Hey @oliverklee,

This appears to be fixed on master as of 936fd8e, so I'm closing this as fixed. Thanks for the report!

@sds sds closed this as completed Nov 11, 2014
@glittershark
Copy link

This still breaks on the following code:

%div{class: @thing.html_class}

@sds
Copy link
Owner

sds commented Nov 13, 2014

@glittershark I can't reproduce the issue with that code snippet on either of Ruby 2.0.0-p451/2.1.2 or with the underlying hamlgem at version 4.0.5 or 4.1.0.beta.1. (using the current master version of haml-lint, which is ff17bba at time of writing)

Can you please do some digging and figure out if you're just running an out-of-date version of haml-lint?

@glittershark
Copy link

Definitely running 0.7.0

@sds
Copy link
Owner

sds commented Nov 13, 2014

@glittershark This isn't fixed on 0.7.0, but is on master.

@glittershark
Copy link

Any way we could get a new release then? 😄

@sds
Copy link
Owner

sds commented Nov 13, 2014

Blocked on #38 and #39, but happy to do so once those are fixed.

In the meantime you can just point your Gemfile to the latest version on master.

gem 'haml-lint', git: 'git://github.com/causes/haml-lint'

@glittershark
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants