Vauxoo / pre-commit-vauxoo

pre-commit-vauxoo python library to add a command to use all the configuration files and environment variables of Vauxoo
Other
2 stars 2 forks source link

Exclude non-installable modules from checks #54

Closed luisg123v closed 2 years ago

luisg123v commented 2 years ago

IMHO modules marked as non-installable on the manifest should be excluded from all checks, unless explicitly specified (maybe by a param)

moylop260 commented 2 years ago

We have a similar code to check if the module is installable from vxci:

This tools is heavy since that has psycopg2 as requirements to work but this particular file is not

And we can not use git submodule because of this is a private project

So, for now we could copy&paste the same file meanwhile we decide as to avoid duplicating code...

We could re-use this way to autofill the exclude part in pre-commit-vauxoo:

Important no raises error if manifest has syntax errors and default is installable True if it is not defined

And showing a _logger.info that they were ignored

moylop260 commented 2 years ago

unless explicitly specified (maybe by a param)

I think for this case I could prefer to KISS

If you need to run pre-commit over an excluded path because of installable:False so you need to enable installable:True then run pre-commit-vauxoo

Something similar with # pylint:disable=CHECK comments

You need to remove them in order to re-enable it

moylop260 commented 2 years ago

@antonag32

Could you help me to fix it, please?

I would like for this case don't refactor anything else only fix the particular issue and create new issue related to refactor if there are cases

What do you think?

luisg123v commented 2 years ago

If you need to run pre-commit over an excluded path because of installable:False so you need to enable installable:True then run pre-commit-vauxoo

Great, I agree.

antonag32 commented 2 years ago

Yes, I'll do it, just wondering why would there be a non-installable module? What is the use case for that? Also I think I don't have access to vxci so If I could get read access to see how it was implemented that would be great. Thanks

moylop260 commented 2 years ago

@antonag32

Thank you

I just have added permission to vxci

Please, confirm

A module could be non-installable if it has not been migrated yet

Or if you have a module installed in production but then deprecated in the same Odoo version

We use non-installable instead of deleting it to be able to uninstall it from production

antonag32 commented 2 years ago

@moylop260 Yes I can see it now. Thanks for the explanation. I will start looking into this.