-
Notifications
You must be signed in to change notification settings - Fork 521
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
Fix #1736: Add Bazel Linter #2048
Fix #1736: Add Bazel Linter #2048
Conversation
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.
LGTM!
Will need to take a look at this tomorrow. Sorry for the delay. |
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.
Thanks @anandwana001! Took a pass.
That sounds fine @anandwana001. Thanks for the initial investigation work. Since we're taking that approach, please make sure that:
|
@anandwana001 PTAL |
I will be updating this pr by this week |
Ok, thanks |
pre-push tracking issue - #2107 |
… introduce-bazel-linter # Conflicts: # model/BUILD.bazel
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.
Thanks @anandwana001. Just had one comment about how we handle the CI linting check. PTAL.
.github/workflows/main.yml
Outdated
@@ -53,7 +53,7 @@ jobs: | |||
run: ./buf check lint --input=model/src/main/proto --input-config buf.yaml && echo "Protobuf lint check completed successfully" | |||
|
|||
- name: Bazel lint check | |||
run: ./buildifier --lint=warn --mode=check --warnings=all -r app data domain model testing utility tools BUILD.bazel WORKSPACE oppia_android_test.bzl | |||
run: ./buildifier --lint=warn --mode=check --warnings=-native-android,+out-of-order-load,+unsorted-dict-items -r app data domain model testing utility tools BUILD.bazel WORKSPACE oppia_android_test.bzl && echo "Bazel lint check completed successfully" |
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.
To clarify: I'm actually suggesting we move to the pattern of running our linters via scripts to avoid duplicating the code between the workflow file & the script. I think adding the pre-push hook in a subsequent PR is fine, but can we also move this to a linter script in this PR to establish that new pattern?
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.
Thanks @anandwana001! This LGTM.
Looks like a rare test infra flake. Restarting. |
… introduce-bazel-linter
Explanation
Fixes #1736: added linter for bazel
Checklist