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

puppet-lint not applying some lint:ignore statements when there are more then 2 on the same line #726

Closed
anthonylo2102 opened this issue Jul 31, 2017 · 0 comments
Labels
Milestone

Comments

@anthonylo2102
Copy link

anthonylo2102 commented Jul 31, 2017

Affected version: 2.2.1 and 2.3.0

I have the following control statements but the middle control statement is not getting applied

# lint:ignore:variable_is_lowercase lint:ignore:single_quote_string_with_variables lint:ignore:ensure_first_param
class XYX(...) {
...}
# lint:endignore

I have tried moving the lint:ignores around (with only 3 in a line) and it seems like the middle one is getting ignored constantly.

However, the following works

# lint:ignore:variable_is_lowercase 
# lint:ignore:single_quote_string_with_variables 
# lint:ignore:ensure_first_param
class XYX(...) {
...}
# lint:endignore
# lint:endignore
# lint:endignore

On a related note, is there an in-file control statement that I can use to ask puppet-lint to ignore the whole file? I am going through a process to run puppet-lint on all our code but would like to ignore code from puppet forge. Right now, I need to ignore individual warnings. Being able to ignore the whole file would be nice.

Thanks!

@rodjek rodjek added the bug label Aug 6, 2017
@rodjek rodjek added this to the Next release (2.3.0 maybe?) milestone Aug 6, 2017
rodjek added a commit that referenced this issue Aug 24, 2017
The original implementation was flawed because the second capture group in the
regex would be overwritten with the value of the last control comment. Instead
of trying to do it all in one pattern, we now split the comment into words and
parse each one seperately.

Fixes #726
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