Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False warning C7902(missing-readme) on some repo #572

Open
legalsylvain opened this issue Jun 1, 2023 · 3 comments
Open

False warning C7902(missing-readme) on some repo #572

legalsylvain opened this issue Jun 1, 2023 · 3 comments
Labels

Comments

@legalsylvain
Copy link
Contributor

Hi all,
Since 3 years, OCA openugprade project is not a fork of odoo, but just two "classic" odoo modules.
We deployed OCA CI and pre-commit and we face to a lot of non blocking warnings that are poluting logs.

************* Module end-migration
openupgrade_scripts/scripts/account/15.0.1.2/end-migration.py:1: [C7902(missing-readme), ] Missing ./README.rst file. Template here: https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst
************* Module post-migration
openupgrade_scripts/scripts/account/15.0.1.2/post-migration.py:1: [C7902(missing-readme), ] Missing ./README.rst file. Template here: https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst
************* Module pre-migration
openupgrade_scripts/scripts/account/15.0.1.2/pre-migration.py:1: [C7902(missing-readme), ] Missing ./README.rst file. Template here: https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst
openupgrade_scripts/scripts/account_check_printing/15.0.1.0/post-migration.py:1: [C7902(missing-readme), ] Missing ./README.rst file. Template here: https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst
...

https://github.com/OCA/OpenUpgrade/actions/runs/5146604073/jobs/9265883758?pr=3905#step:4:87

As fair as I understand, it detects that end-migration is a module, so it raises a warning, because README.rst file is absent.

Do you know why ? That's quite annoying, when we are running pre-commit locally.
Note : I faced to the same issue, in other GRAP OCA modules, when there is a "migrations" folder. But here, in the current case, there are 200 migration folders...

CC : @yajo, @sbidoul, @pedrobaeza

Kind regards.

@sbidoul
Copy link
Member

sbidoul commented Jun 1, 2023

Does it make sense to use pylint-odoo for this project? I'd think flake8 is sufficient. Or you can disable messages in .pylintrc?

But overall I think the oca addons repo template does not apply to openupgrade, as it is meant to be used with... addons repos :)

@legalsylvain
Copy link
Contributor Author

But overall I think the oca addons repo template does not apply to openupgrade, as it is meant to be used with... addons repos :)

But that's now addons repo. See :

Does it make sense to use pylint-odoo for this project? I'd think flake8 is sufficient. Or you can disable messages in .pylintrc?

Some checks maybe doesn't make sense or will be useless, but framework module contains code that can be "pylinted" and migrations scripts contains python files that can be also checked. relative-import, sql-injection, ...
In fact, for the time being, I just disabled one check here :
https://github.com/OCA/OpenUpgrade/blob/16.0/.pylintrc#L72 because there are a lot of xml files. (noupdate_changes.xml) that are not imported in the manifest. (file-not-used)

Well, my question is why pylint think that a subfolder is a module.

(If not found, indeed I can disable missing-readme, but I think that something is wrong somewhere).

@sbidoul
Copy link
Member

sbidoul commented Jun 1, 2023

But that's now addons repo

Ah, ok, yes I remember that discussion.

Well, my question is why pylint think that a subfolder is a module.

That's probably a question for the pylint-odoo project then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants