5332b07b5cac4e0cd06ec51fb6770e35d985aab6
Hanno Böck add pylint, rename

Hanno Böck authored 4 years ago

1) import unittest
2) import subprocess
3) import glob
4) 
5) 
6) class TestCodingstyle(unittest.TestCase):
7)     @staticmethod
8)     def test_codingstyle():
Hanno Böck add update-freewvsdb and se...

Hanno Böck authored 4 years ago

9)         pyfiles = ["freewvs", "update-freewvsdb",
10)                    "setup.py"] + glob.glob("tests/*.py")
Hanno Böck add pylint, rename

Hanno Böck authored 4 years ago

11)         subprocess.run(["pycodestyle", "--ignore=W503"]
12)                        + pyfiles, check=True)
13)         subprocess.run(["pyflakes"] + pyfiles, check=True)
Hanno Böck disable too-many-arguments...

Hanno Böck authored 4 years ago

14) 
Hanno Böck add update-freewvsdb and se...

Hanno Böck authored 4 years ago

15)         pylint_disable = "missing-docstring,invalid-name," \
16)                          + "too-many-arguments,duplicate-code"
Hanno Böck disable too-many-arguments...

Hanno Böck authored 4 years ago

17)         subprocess.run(["pylint", "--disable=%s" % pylint_disable]
Hanno Böck add pylint, rename

Hanno Böck authored 4 years ago

18)                        + pyfiles, check=True)
19) 
Hanno Böck use dlint code analyzer

Hanno Böck authored 4 years ago

20)         subprocess.run(["flake8", "--select=DUO"] + pyfiles, check=True)
Hanno Böck pyupgrade check

Hanno Böck authored 3 years ago

21)         subprocess.run(["pyupgrade", "--keep-percent-format", "--py38-plus"]
22)                        + pyfiles, check=True)
Hanno Böck use dlint code analyzer

Hanno Böck authored 4 years ago

23)