-
Notifications
You must be signed in to change notification settings - Fork 140
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
Linter integration #1143
Linter integration #1143
Conversation
08bbc2c
to
3c66572
Compare
53d9811
to
965ded1
Compare
d4cbb86
to
a456cd9
Compare
name = "tests-vulkan-generator", | ||
tests = [ | ||
# Run the linting as part of Vulkan generator tests | ||
"//:lint", # DO NOT REMOVE! |
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.
Do we need a comment saying do not remove?
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.
Well, it is very easy to remove a test from bazel and not catch its missing. I just want to ensure that no one comes and says "why this is here" and remove it without thinking the implications. Having it there has no harm.
TARGETS=$(echo "$TARGETS" | grep -v "_flake8" | grep -v "_mypy" | grep -v "_pylint") | ||
|
||
# Sort the linting targets alphabetically | ||
TARGETS=$(echo "$TARGETS" | sort -t: -k1,1) |
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.
Can we factor this common stuff out somehow?
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.
I was thought of but almost every function there is a singular presubmit case. So the benefit of splitting it have not justified break the pattern for me. Instead I put them in a way to make the process clearer for both case.
tools/build/python/lint_flake8.py
Outdated
|
||
|
||
if __name__ == "__main__": | ||
flake8_cli.main(sys.argv[1:]) |
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.
new line
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.
👍
Add flake8, autopep8 and mypy to our build pipeline and fix the errors from new linters
Integrate Autopep8, Flake8 and mypy to our build system.