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

unable to disable 140chars check with control comments "block" #622

Closed
jhoblitt opened this issue Jan 16, 2017 · 2 comments · Fixed by #648
Closed

unable to disable 140chars check with control comments "block" #622

jhoblitt opened this issue Jan 16, 2017 · 2 comments · Fixed by #648
Assignees
Milestone

Comments

@jhoblitt
Copy link

Appending # lint:ignore:140chars to an already very long line does disable the 140char check but it would be nice to almost be able to disable the 140char check in a "block". Eg.:

$ bundle exec puppet-lint --version
puppet-lint 2.1.0
$ cat foo.pp 
jenkins::cli::exec { "create-jenkins-credentials-${title}":
  # lint:ignore:140chars
  unless  => "for i in \$(seq 1 ${::jenkins::cli_tries}); do \$HELPER_CMD credential_info ${title} && break || sleep ${::jenkins::cli_try_sleep}; done | grep ${title}",
  # lint:ignore:end
}
$ bundle exec puppet-lint foo.pp 
WARNING: line has more than 140 characters on line 3
@rnelson0
Copy link
Collaborator

Per http://puppet-lint.com/controlcomments/ this should work.

@rodjek rodjek self-assigned this Feb 23, 2017
@rodjek
Copy link
Owner

rodjek commented Feb 27, 2017

@jhoblitt This is due to using lint:ignore:end instead of lint:endignore, which told puppet-lint to ignore the results of the end check (if one existed), instead of closing out the ignore block.

This is not a great user experience clearly, so I'm going to push up a PR that warns you if you have any unterminated ignore control comment blocks before closing this issue out.

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

Successfully merging a pull request may close this issue.

3 participants