nginx-linter
nginx-linter copied to clipboard
Ignoring certain rules
Hi,
I just tried using nginx-linter
on an existing project and got 6287
errors :smiling_face_with_tear:.
After setting indentation
and trailing-whitespace
to warn
i get significantly less, but it is hard to find the errors, if there are so many warning messages.
Is it possible to complete disable a certain rule via config?
Yes, I believe you can do the following:
{
"severity": {
"trailing-whitespace": "off"
}
}
Let me know if that works for you
Sorry for my late answer. It looks like "off" only changes the log level, but messages are still displayed.
With 1000 "style" errors next to 50 other errors (that I would like to fix), it is a little difficult :grimacing:
Apologies, I gave you the wrong configuration advice 😅.
Try this out:
{
"indentation": false,
"trailing-whitespace": false
}
Note that this time its not nested under the severity
section and its using false
instead of "off"
This worked thanks :+1: Feel free to close the issue.