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

Ignoring certain rules #28

Open
tobijdc opened this issue Jan 11, 2023 · 4 comments
Open

Ignoring certain rules #28

tobijdc opened this issue Jan 11, 2023 · 4 comments
Labels
question Further information is requested

Comments

@tobijdc
Copy link

tobijdc commented Jan 11, 2023

Hi,

I just tried using nginx-linter on an existing project and got 6287 errors 🥲.
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?

@jhinch
Copy link
Owner

jhinch commented Jan 11, 2023

Yes, I believe you can do the following:

{
    "severity": {
        "trailing-whitespace": "off"
    }
}

Let me know if that works for you

@jhinch jhinch added the question Further information is requested label Jan 12, 2023
@tobijdc
Copy link
Author

tobijdc commented Jan 27, 2023

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 😬

Screenshot from 2023-01-27 09-30-28
Screenshot from 2023-01-27 09-29-32

@jhinch
Copy link
Owner

jhinch commented Jan 27, 2023

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"

@tobijdc
Copy link
Author

tobijdc commented Jan 30, 2023

This worked thanks 👍
Feel free to close the issue.

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

No branches or pull requests

2 participants