codecheck: rely on flake8, isort + black during build time
authorMichael Prokop <mika@grml.org>
Thu, 2 Apr 2020 14:45:12 +0000 (16:45 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 2 Apr 2020 15:09:35 +0000 (17:09 +0200)
Switch from pyflakes, pylint + pep8 to flake8, isort + black,
and include it in the default build target to get checks during
build time. Add relevant packages to Build-Depends.

Thanks: Florian Apolloner for the feedback

Makefile
debian/control
setup.cfg [new file with mode: 0644]

index b8f1e05..f2103fa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-all: doc
+all: codecheck doc
 
 doc: doc_man doc_html
 
@@ -50,11 +50,9 @@ clean:
        rm -rf html-stamp man-stamp grml2usb.tar.gz grml2usb.tgz grml2usb.tgz.md5.asc
 
 codecheck:
-       pyflakes grml2usb
-       pylint --include-ids=y --max-line-length=120 grml2usb
-       # pylint --include-ids=y --disable-msg-cat=C0301 --disable-msg-cat=W0511 grml2usb
-       # pylint --reports=n --include-ids=y --disable-msg-cat=C0301 grml2usb
-       pep8 --repeat --ignore E125,E126,E127,E128,E501 grml2usb
+       flake8 grml2usb
+       isort --check-only grml2usb
+       black --check grml2usb
 
 # graph:
 #      sudo pycallgraph grml2usb /grml/isos/grml-small_2008.11.iso /dev/sdb1
index 8d01d35..ba485f8 100644 (file)
@@ -7,9 +7,12 @@ Uploaders: Michael Prokop <mika@debian.org>,
            Christian Hofstaedtler <zeha@debian.org>,
            Ulrich Dangel <mru@spamt.net>
 Build-Depends: asciidoc,
+               black,
                debhelper-compat (= 12),
                docbook-xsl,
-               xsltproc
+               flake8,
+               isort,
+               xsltproc,
 Standards-Version: 4.4.1
 Homepage: https://grml.org/grml2usb/
 Vcs-git: git://git.grml.org/grml2usb.git
diff --git a/setup.cfg b/setup.cfg
new file mode 100644 (file)
index 0000000..fe326c8
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,2 @@
+[flake8]
+ignore = E203, E501, W503