-
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 to the project #1745
Fix #1736: Add Bazel Linter to the project #1745
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.
Thanks @anandwana001! This looks like a great start. Left some comments.
As of now, I am trying to remove the package(default_visibility) and getting an error where the utility module has to access |
Not solved, another error with other manifest files. |
# BUILD | ||
# *.bzl | ||
|
||
exec ./buildifier --lint=warn --mode=check --warnings=all -r app data domain model testing utility tools BUILD.bazel WORKSPACE oppia_android_test.bzl |
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.
This expects the buildifier path to be the current path right? When we introduce pre-push hooks, that may not be the case so let's add an install path variable and prefix this call with that
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
Closing this PR and continuing the work in different PR and will follow the reviews there, as there is a bunch of conflicts hereafter changing the package naming. |
Explanation
Fix #1736
This is the first part where we want to add linter for bazel.
How to test
brew install buildifier
on your root - this will install the buildifierThere are currently two types of issue which auto-fix cannot fix
How to review
Until now in this PR, I had fixed and added only root bazel files in checks. Before moving forward with the bazel files in modules, we need to clarify a few points which are a bit different way a linter fix the issues.
Now
After First Review, I will add all bazel files to check
Checklist