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

add severity level support for all linters #349

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

domingo2000
Copy link

This PR fixes #348.

Introduce a severity level of :error by default to all the linters that does not have a configured severity level. Introducing a new severity level property in the linter configuration we achieve that now all the linters can have a severity property in the .erb-lint.yml.

Because currently the linter already has support for some compatibility with the severity levels of rubocop, this change only extends the same behaviour but for all linters.

This permits for example to omit the errors of MyCustomLinter when running erblint foo.erb with the following configuration

MyCustomLinter:
    enabled: true
    severity: info

This is useful to introduce linters in a codebease in an incremental manner, to configure to not throw errors when introducing a linter but still seeing it in the editor, for example when running the linter in CI.

@domingo2000 domingo2000 force-pushed the add-severity-level-for-all-linters branch 4 times, most recently from a2fa4cb to 7c37134 Compare May 10, 2024 19:39
@domingo2000
Copy link
Author

@etiennebarrie Could you help with the revision here?

@etiennebarrie
Copy link
Member

Can you add information about the feature in the README?

@domingo2000 domingo2000 force-pushed the add-severity-level-for-all-linters branch from 7c37134 to e3cda2b Compare May 17, 2024 17:30
@domingo2000
Copy link
Author

domingo2000 commented May 17, 2024

@etiennebarrie Done!

I created a section of the severity configuration in the README.md. Also improved the CLI documentation on the --fail-level option that makes this feature more usable on different severity values.

@domingo2000
Copy link
Author

@andyw8 @etiennebarrie Any updates on this?

@meraioth
Copy link

meraioth commented Jul 3, 2024

@jenshenny @etiennebarrie any update? We are looking forward to this feat

@andyw8
Copy link
Contributor

andyw8 commented Jul 3, 2024

I'm not a maintainer of this repo, please stop pinging me.

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 this pull request may close these issues.

Add severity level support like rubocop
4 participants