-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flake8 linting #44
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the repo actually lint clean? We shouldn't add new blocking lint checks if they aren't yet green. |
||
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 | ||
Comment on lines
+34
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have a strong opinion on this particular lint check, since I don't contribute to this repo often. However, my general impression is that this repo is less stringent with style, testing, code review, etc. so these checks may be a little heavy to introduce. |
||
|
||
- name: Run Tests | ||
shell: bash | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint checks should be added in a separate action that runs on pull requests. This action is just for daily regression testing.