Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add flake8 linting #44

wants to merge 1 commit into from

Conversation

powderluv
Copy link
Contributor

No description provided.

@@ -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
Copy link
Member

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.


- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Copy link
Member

Choose a reason for hiding this comment

The 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.

Comment on lines +34 to +36
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
Copy link
Member

Choose a reason for hiding this comment

The 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants