On Sun, Nov 21, 2021 at 08:48:40PM -0700, Simon Glass wrote: > At present the Python code in U-Boot is somewhat inconsistent, with some > files passing pylint quite cleanly and others not. > > Add a way to track progress on this clean-up, by checking that no module > has got any worse as a result of changes. > > This can be used with 'make pylint'. > > Signed-off-by: Simon Glass <[email protected]> > --- > > .gitignore | 4 + > Makefile | 45 +++++++- > doc/develop/index.rst | 8 ++ > doc/develop/python_cq.rst | 80 +++++++++++++++ > scripts/pylint.base | 211 ++++++++++++++++++++++++++++++++++++++ > 5 files changed, 347 insertions(+), 1 deletion(-) > create mode 100644 doc/develop/python_cq.rst > create mode 100644 scripts/pylint.base
So, I'm applying this momentarily. But given the discussion at the time, I wanted to follow up as well with some commentary. The scoring mechanism is not perfect and I'm not applying the final part of this to enable CI yet. In terms of minimum score? I don't know how that would work, setting aside problems like removing code leads to a possibly worse ratio. Maybe we need to get some people listed under MAINTAINERS for python code? I'll be putting pylint in my local testing loop and that'll at least make me question regressions but arbitrarily taking "binman.fdt_test 3.23" I can't see what on earth is even related to that score since there's nothing useful to me under "git grep fdt_test tools/". But overall I think this at least starts us down the right track of making it easier to make our python code more generally python compliant. -- Tom
signature.asc
Description: PGP signature

