-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Rewrite buildifier wrapper as bazel-bin/tools/lint/buildifier #7175
Rewrite buildifier wrapper as bazel-bin/tools/lint/buildifier #7175
Conversation
a2bd5a8
to
399436a
Compare
Review status: 0 of 13 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
Reviewed 14 of 14 files at r1. drake/doc/bazel.rst, line 129 at r1 (raw file):
Do you think it's good to have the following line? bazel build //tools/lint:buildifier tools/lint/util.py, line 48 at r1 (raw file):
BTW, how about the following (which might be more readable)? rel_dirpath = os.path.relpath(abs_dirpath, workspace_root) Comments from Reviewable |
cd09f15
to
e4d7eae
Compare
+@ggould-tri for platform review per rotation, please. Review status: 12 of 13 files reviewed at latest revision, 2 unresolved discussions. drake/doc/bazel.rst, line 129 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
Done, thanks for the reminder. I'd had this text in an original draft but lost it during rebasing. tools/lint/util.py, line 48 at r1 (raw file): Previously, soonho-tri (Soonho Kong) wrote…
OK I hadn't of that, but I just tried it, and it leaves Comments from Reviewable |
FYI /CC @SeanCurtis-TRI in case you want to jump in as a user representative. (I don't think CLion cares much about this one; in next PRs where I update cpplint and clang-format-includes similarly, I will be sure to tag you.) |
Review status: 12 of 13 files reviewed at latest revision, 1 unresolved discussion. tools/lint/util.py, line 48 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
OK. I agree. Comments from Reviewable |
Reviewed 1 of 1 files at r2. Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions. tools/lint/BUILD.bazel, line 22 at r2 (raw file):
Is there a way to prevent this from being invoked via tools/lint/find_data.py, line 1 at r2 (raw file):
It is not clear from context that "data" and "py_binary" refer to the bazel concepts. Mention that this is is concerning itself with Bazel lint data. Comments from Reviewable |
Details: - Add tools/lint:find_data and unit test. - Add tools/lint:util and unit test. - Rewrite buildifier.sh in python: - Add explicit opt-in for --all. - Improve the command-line processing and help. - List out specific files that fail, instead of all. - Port automated linting to use the new tool. - Update docs.
e4d7eae
to
20491a7
Compare
Review status: 11 of 13 files reviewed at latest revision, 2 unresolved discussions. tools/lint/BUILD.bazel, line 22 at r2 (raw file): Previously, ggould-tri wrote…
Done. In 'check' and 'diff' mode we should allow it, but in other modes now we fail. tools/lint/find_data.py, line 1 at r2 (raw file): Previously, ggould-tri wrote…
Done. Comments from Reviewable |
Reviewed 11 of 14 files at r1, 1 of 1 files at r2, 2 of 2 files at r3. Comments from Reviewable |
FYI I'm assuming that CLion will be untouched by this. Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending. Comments from Reviewable |
Yeah. And also I left a deprecation shim in place, so if you somehow see deprecation warnings, then we'll have to find what's going on. |
Relates #6996.
Details:
tools/lint:find_data
and unit test.tools/lint:util
and unit test.buildifier.sh
in python, nowbazel-bin/tools/lint/buildifier
:--all
.This change is