Open oscarolar opened 3 years ago
@antonag32
Consider exceptions for test*/
, migrations/*
script*/
and consider use the lineno to 1 in order to be able to disable with comment # pylint: disable=...
@antonag32
There is a hook to check large files:
Maybe, it could be done using a similar way to check empty ones
But I'm thinking about valid empty ones since __init__.py
could be a valid empty since it is used to define a python package for a folder
Are there other ones?
Also, I don't think it should be only for python files (similar to large files)
Could you create a new PR/issue to discuss it in, please?
Sounds nice. I was working on the Odoo part which involves ensuring python files are imported in __init__.py
. I have created the issue in pre-commit-hooks, and already have a POC here: https://github.com/antonag32/pre-commit-hooks/commit/bb25e7f42a8d5555db73f20c781b28d6ea6e0048
This file https://git.vauxoo.com/absa/absa/-/blob/12.0/absa/controllers/test.py
was introduced in this commit: https://git.vauxoo.com/absa/absa/-/commit/37bba8c3c2c642b419efb306209e40a0c9a954ca
but the pipelines were all green: https://git.vauxoo.com/absa/absa/-/pipelines/116399 (excepting odoo_warnings but there was no reference at the file there)
seems to me that it should throw a couple of Pylint errors, something like: