OCA / odoo-pre-commit-hooks

Linters of Odoo addons that complement pylint-odoo
GNU Affero General Public License v3.0
10 stars 12 forks source link

Add configparser for message control #37

Closed moylop260 closed 1 year ago

moylop260 commented 2 years ago

Add a configuration file by default $(pwd)/.oca_pch.cfg if not then ~/.oca_pch.cfg but prefer the parameter -c --config

Notice the name is only an idea since it is hard to me the named of things

[MESSAGES CONTROL]  # Name inspired in .pylintrc
enable=check-name_x,
    check-name_y,

disable=check-name_z,
    check-name_w,

Using the built-in python lib configparser in order to avoid adding new requirements

antonag32 commented 2 years ago

For the record, after talking with some other devs, .oca_hooks.cfg was chosen.

moylop260 commented 2 years ago

As part of this same issue

Could you add in the README and example of the configuration file with options, please?

moylop260 commented 2 years ago

Add default values in the argument parser related to argument config:

See example from doc8 --help

  --config path         user config file location (default: doc8.ini, .config/doc8.ini,
                        tox.ini, pep8.ini, setup.cfg, pyproject.toml).
github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.