Vauxoo / maintainer-quality-tools

QA tools for Odoo maintainers
GNU Affero General Public License v3.0
3 stars 9 forks source link

pre-commit: pylint,eslint - Add feature to disable checks using environment variable #340

Closed moylop260 closed 1 year ago

moylop260 commented 2 years ago

Each vauxoo project can decide to disable a few checks

It could be interesting to be able to use an environment variable to disable them

Very similar to the feature to exclude modules or files:

But this time to disable a enabled check from:

Or

I'm not sure what is the better option if parsing the configuration file to disable the check or modifying the pylint command of the pre-commit to disable=checks

The name of the variable could be PYLINT_DISABLE_CHECKS=check-name1,check-name2

Consider create a dummy MR using a real project

antonag32 commented 2 years ago

@moylop260 I implemented your requested changes and created a PR accordingly. However I don't understand the last part about a dummy MR. I tested the changes locally and they do work, do you want me to implement a Github Action on a repository and run pre-commit with my changes to verify checks are disabled?

luisg123v commented 2 years ago

Hi @antonag32,

What @moylop260 means is, to test your changes, you should use your dev branch on a real project.

You can check this as an example (it was used to test this)

Regards,

antonag32 commented 2 years ago

Thanks @luisg123v, I created the dummy MR, lets see how it goes.