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

LineLength is calculated from logical lines instead of from screen lines #26

Closed
oliverklee opened this issue Aug 25, 2014 · 2 comments
Closed
Labels

Comments

@oliverklee
Copy link
Contributor

This problem might related to issue #25. It occurs with haml-lint 0.6.0 and rubocop 0.25.0.

For testing the issue, I have set the maximum line length to 200 both in my rubocop configuration as well as my haml-lint configuration. I get this error for the following HAML lines:

klee@gonzales:~/eclipse/justworkshops$ haml-lint app/views/
app/views/home/admin.html.haml:118 [W] Line is too long. [358/200]

This is the corresponding piece of HAML code:

  %p!= t 'views.home.admin.statisticsText1Html',
    users: number_with_delimiter(5_392, delimiter: t('views.thousandsSeperator')),
    attendees: number_with_delimiter(4_966, delimiter: t('views.thousandsSeperator')),
    offerers: number_with_delimiter(554, delimiter: t('views.thousandsSeperator')),
    admins: number_with_delimiter(4, delimiter: t('views.thousandsSeperator'))

It seems that HAML (or RuboCop?) check the length of the logical line (consisting of 5 screen lines) instead of the lengths of the individual screen lines.

@sds sds added the bug label Aug 25, 2014
@sds
Copy link
Owner

sds commented Aug 25, 2014

Yes, this is a bug due to the namespace change of Rubocop's LineLength cop. I've fixed this in c155377 and released a new version 0.6.1.

Thanks for the report!

@sds sds closed this as completed Aug 25, 2014
@oliverklee
Copy link
Contributor Author

❤️

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