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 parameter is ignored #25

Closed
oliverklee opened this issue Aug 25, 2014 · 3 comments
Closed

LineLength parameter is ignored #25

oliverklee opened this issue Aug 25, 2014 · 3 comments
Labels

Comments

@oliverklee
Copy link
Contributor

haml-lint always uses 80 as the line length limit independent of the configured value:

klee@gonzales:~/eclipse/justworkshops$ haml-lint app/views/
app/views/devise/confirmations/new.html.haml:3 [W] Line is too long. [108/80]

This is my .haml-lint.yml (in the current working directory):
linters:
LineLength:
max: 400

This happens with haml-lint 0.6.0 and rubocop 0.25.0. I think one of the recent rubocop upgrades has caused this. IIRC, Rubocop has renamed/moved the parameter for their line length parameter. It has moved to Metrics/LineLength: Max.

@oliverklee
Copy link
Contributor Author

I have to add a .rubocop.yml and set the (same) maximum line length there to get haml-lint to complain about my lines that are 100 characters or so.

@sds
Copy link
Owner

sds commented Aug 25, 2014

@oliverklee I don't see the issue you are describing with the latest version of haml-lint (0.6.0 at time of writing).

Are you sure you're not confusing the Rubocop LineLength cop with haml-lint's LineLength linter?

Rubocop's LineLength cop is disabled by default, since it doesn't make sense in the context of HAML documents since haml-lint auto-generates Ruby code to pass to Rubocop.

You need to add the following to your .haml-lint.yml configuration file (or whichever file you pass in via the -c option) in order to adjust the maximum line length allowed:

linters:
  LineLength:
    max: 400

I know you mentioned all of this in your issue, but I mention it here for posterity's sake. This definitely works as intended on my system. (is Eclipse running haml-lint in a different working directory?)

@sds sds closed this as completed Aug 25, 2014
@sds
Copy link
Owner

sds commented Aug 25, 2014

Nevermind. Your other issue better explained the problem you were seeing. I'll address it there.

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