HomeClusterLabs Projects

Build: python: Consolidate python checking rules into python.mk.

Description

Build: python: Consolidate python checking rules into python.mk.

At the moment, we've got rules to run pylint scattered across a couple
different makefiles, which is a great opportunity for them to get out of
sync. Also, the pyflake rule hasn't gotten copied around to all the
same files.

Instead, move both rules into a python.mk file that can be included in
any makefiles. You can then run "make -C <dir> pylint" to perform the
checks.

Various notes about this:

  • pyflake spews errors in cts/, which is mostly because those files have not seen a lot of attention outside of just keeping them working.
  • It's still up to us to know which directories contain python stuff that we should periodically run these checkers on.
  • You can also just run these targets on single files:

    $ make -C cts PYCHECKFILES=cts-attrd pylint

    Note that you can either use the full path to the file or just the filename. Do not use a relative path.

Details

Provenance
clumensAuthored on May 21 2024, 1:46 PM
Parents
rP86f45d275971: Merge pull request #3459 from clumens/iso8601
Branches
Unknown
Tags
Unknown