OCA / odoo-pre-commit-hooks

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

Be able to run the hook for a particular XML file even if it is not part of the manifest datas #51

Open moylop260 opened 1 year ago

moylop260 commented 1 year ago

Odoo new versions added a complicated way to get the data files to see the following example:

In fact, there are glob expressions:

And there are not only string values but tuples

So, it is too complex to manage from the hook all the considerations (or maybe not)

But if we missed parser something could be great be able to use a particular XML file directly and get all the checks even if it is not part of the data from manifest file

It requires a big refactoring but could be good to have it

Fixes related https://github.com/OCA/odoo-pre-commit-hooks/pull/54