-
-
Notifications
You must be signed in to change notification settings - Fork 642
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 new fmt plugins for build file formatting #16560
Conversation
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
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.
Amazing!! Thoughts on what testing strategy would make sense? We already test Black extensively in black/rules_integration_test.py
, and we have the same tests in update_build_files_test.py
.
Maybe we add one simple RuleRunner
test for the new backends? Only to make sure the wiring is correct etc. Or even copy over the update-build-files tests?
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
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.
Nice! Thanks! Let's get approval from at least one other person on the backend names? They make sense to me.
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Piggybacking off the previous changes, this PR adds two new plugins at `pants.backend.build_files.fmt` (`black` and `yapf`) which format BUILD files in `fmt` (and verify in `lint`). Additional plumbing has been made to re-use the same codepaths in all of `update-build-files`, `fmt` on BUILD, and `fmt` for Python targets. Commits useful in order. [ci skip-rust] [ci skip-build-wheels]
Piggybacking off the previous changes, this PR adds two new plugins at
pants.backend.build_files.fmt
(black
andyapf
) which format BUILD files infmt
(and verify inlint
).Additional plumbing has been made to re-use the same codepaths in all of
update-build-files
,fmt
on BUILD, andfmt
for Python targets.Commits useful in order.
[ci skip-rust]
[ci skip-build-wheels]