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

Newline at end of file is triggering false positive for LeadingCommentSpace #45

Closed
monfresh opened this issue Dec 2, 2014 · 3 comments
Labels

Comments

@monfresh
Copy link

monfresh commented Dec 2, 2014

Hi. Thanks for this tool. It's really helpful.

I just upgraded to haml-lint 0.8.0 and now I'm getting a bunch of false positives for the LeadingCommentSpace error in files that do not have any comments at all. It appears that every single haml file is reporting this issue, and not a single one has a comment.

For example:
https://github.com/codeforamerica/ohana-api/blob/master/app/views/admin/contacts/_form.html.haml

Based on the line number in the error report, what appears to be triggering this is the newline at the end of each file, which is required per the Ruby Style Guide.

I'm on OS X 10.9.5 with Ruby 2.1.3 and Rails 4.1.8.

@monfresh
Copy link
Author

monfresh commented Dec 2, 2014

The culprit is haml 4.0.6.
haml 4.0.5 + haml-lint 0.8.0 does not exhibit this issue.

@monfresh
Copy link
Author

monfresh commented Dec 2, 2014

The only change I see between 4.0.5 and 4.0.6 is this regex change. Could that be the cause of the issue?

@sds sds added the bug label Dec 3, 2014
@sds
Copy link
Owner

sds commented Dec 3, 2014

Hey @monfresh, thanks for the report.

I actually noticed and fixed this issue in f695865. We weren't expecting another 4.0.x release since 4.1.0.beta.1 was out, but apparently that was an invalid assumption.

@sds sds closed this as completed Dec 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants