Fix some bugs

Change lint.py to print the name of file being linted for easy debugging. Also removed a bug from website\main.py
This commit is contained in:
Rohit Tanwar
2018-04-12 17:46:30 +05:30
parent 0c4e433628
commit 5b7baf43f8
5 changed files with 32 additions and 30 deletions

View File

@ -2,6 +2,7 @@ import util
import subprocess
import sys
for snippet in util.read_snippets():
print(snippet.name)
code = snippet.read_code()
check_1 = subprocess.run(['flake8', '-','--select=E901,E999,F821,F822,F823','--count','--show-source','--statistics'], input=code, encoding='utf8',stdout=subprocess.PIPE)
check_2 = subprocess.run(['flake8', '-','--exit-zero','--max-complexity=10','--count','--max-line-length=127','--statistics','--ignore=W292'], input=code, encoding='utf8',stdout=subprocess.PIPE)