From 79e97e4f1203788246f2696a0106cf1483444718 Mon Sep 17 00:00:00 2001 From: powderluv Date: Thu, 2 Jun 2022 22:24:42 -0700 Subject: [PATCH] Add flake8 linting --- .github/workflows/regression_tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/regression_tests.yml b/.github/workflows/regression_tests.yml index 1d6ec6a5..96c62f47 100644 --- a/.github/workflows/regression_tests.yml +++ b/.github/workflows/regression_tests.yml @@ -26,6 +26,14 @@ jobs: python -m pip install --upgrade pip python -m pip install -r requirements.txt pip freeze | egrep 'iree|tensorflow' + python -m pip install flake8 pytest + + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude lit.cfg.py + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude lit.cfg.py - name: Run Tests shell: bash