OCA / pylint-odoo

Odoo plugin for Pylint
http://www.pylint.org
143 stars 168 forks source link

manifest_version_format option was ignored #337

Closed voronind closed 3 years ago

voronind commented 3 years ago
$ pylint --load-plugins=pylint_odoo --long-help | grep manifest_version_format -A3
--manifest_version_format=<string>
                        Regex to check version format in manifest file. Use
                        "{valid_odoo_versions}" to check the parameter of
                        "valid_odoo_versions" [current: ^12$]

In fact we can not custom this option cause code uses just default DFTL_MANIFEST_VERSION_FORMAT variable.
We need to custom this option cause pylint-odoo is used not for OCA modules only.

moylop260 commented 3 years ago

Could you help us with the steps to reproduce it, please?

voronind commented 3 years ago

Could you help us with the steps to reproduce it, please?

Add to .pylintrc option with any value. For example

[ODOOLINT]
manifest_version_format=({valid_odoo_versions})\.\d+(?:\.\d+)?$

If version format doesn't confirm default we get error:

addon-name/__manifest__.py:1:0: C8106: Wrong Version Format "11.0.1" in manifest file. Regex to match: "(11\.0)\.\d+\.\d+\.\d+$" (manifest-version-format)

I saw sources. There is no option using. It was worked well before.

voronind commented 3 years ago

:+1: