On Thu, 2019-09-12 at 12:00 +0100, Daniel P. Berrangé wrote:
On Thu, Sep 12, 2019 at 12:56:04PM +0200, Andrea Bolognani wrote:
> FWIW, libvirt-dbus is using flake8 to achieve what I believe is
> basically the same result, whereas virt-manager I think uses pylint
> and pycodestlye.
>
> I am not familiar enough with the Python ecosystem to be able to
> compare the various linters, but it would IMHO make sense to at
> least try to standardize on one or more of them and use them across
> libvirt-related projects.
pep8 validates code style against published PEP style guidelines.
pyflakes does static analysis to detect code errors
flake8 is a wrapper that runs pep8 and pyflakes and does some
other stuff.
For just doing this semicolon check then pep8 is sufficient,
but for a more general approach, then flake8 makes more
sense. In that case we'd delete sc_prohibit_semicolon_at_eol_in_python
entirely, and simply have a generic 'sc_flake8' check that runs a
configured list of checks against all py code.
Yeah, the more general approach makes sense to me, so I would go
that route directly instead of introducing pep8 first and only then
moving to flake8.
--
Andrea Bolognani / Red Hat / Virtualization