added linter

This commit is contained in:
Robin Müller 2021-06-30 11:18:57 +02:00
parent 011fea37a0
commit 96e9f26fd0
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

15
lint.py Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import os
import sys
def main():
status = os.system("flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics")
if os.WEXITSTATUS(status) != 0:
print("Flake8 linter errors")
sys.exit(0)
os.system("flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics")
if __name__ == "__main__":
main()