-
Notifications
You must be signed in to change notification settings - Fork 204
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
turn off particular tests? .puppet-lintrc? #34
Comments
I'm actually working on the ability to selectively disable checks at the moment, it shouldn't be too long. |
Great news! |
This is being worked on as part of the modularise branch. Coming real soon now. |
OK, so you can now disable checks! |
Sorry, should mention you'll need to upgrade to 0.1.11 |
Thanks for implementing my feature request! I finally got around to upgrading (jumped up from 0.1.5 to 0.1.12) and it works great! My only suggestion is to document the ability to use |
Yep, documentation is really lacking. Updating it all and explaining what each warning/error means & how to fix it is a project for a rainy weekend (like this coming one actually). On Thursday, 2 February 2012 at 6:38 AM, Philip Durbin wrote:
|
I would love the ability to disable particular tests from within the manifest, either on a line-by-line basis on within a block, or both. Specifically, I want the >80 char check everywhere except on the lines that have our revision control tags, which frequently expand to >80 chars. |
If you want a new feature request for this, I'd gladly write it up. |
I don't think thats gonna be an easy one, since some checks run on the lines while others depend on the tokens. Tokens don't contain comments since those don't get included by the puppet parser by default. I wanted to write some checks on proper puppet docs so I've run into this barrier before. |
We can access the comments through the lexer's commentstack however it is a bit of a pain in the arse. If in doubt, monkey patch the lexer again. |
To follow up, the way I'd see this potentially working is
|
I'm hoping for something like what pylint (http://www.logilab.org/card/pylint_manual) can do, where you put a comment like "# puppet-lint: disable=80chars-check" or similar at the end of a line and it doesn't lint that line for that check. Also able to disable a check for a block of lines by surrounding with "# puppet-lint: disable=whatever" [...] "# puppet-lint: enable=whatever" |
That is going to be rather tricky. As @vStone pointed out earlier, the Puppet parser basically discards any comments in your manifests. It's not impossible though. I'd suggest taking this discussion into a new issue for clarity. |
Add GitHub Actions annotations
Is it possible to turn off particular tests in puppet-lint? For example, one test is "Should not exceed an 80 character line width" but what if I wanted to disable this test altogether?
In perltidy I do something similar, using the option
--noblanks-before-blocks
in my .perltidyrc, per the documentation because I don't like the default behavior.It would be great to have a .puppet-lintrc. Apologies if there already is one and I missed it.
The text was updated successfully, but these errors were encountered: