Add clang-format support for the experimental c/cpp plugin#15395
Add clang-format support for the experimental c/cpp plugin#15395Eric-Arellano merged 9 commits intopantsbuild:mainfrom
Conversation
- Updated to 2.13.x - Removed explicit LintTargetRequests - Replaced `cpp` targets with `cc` # 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]
|
Tests coming tomorrow! |
|
Also, I need to spend some time looking at the command line arguments, I just put in some sane placeholders for now. |
# 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]
- Added `args` option to command-line Pants # 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]
- Also testing configuration # 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]
…e pre-commit # 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]
Eric-Arellano
left a comment
There was a problem hiding this comment.
Sweet! Thanks so much!
Regarding software supply chain management, the help message for the |
Good point - I actually thought I did put it in help, but turns out it was only in this PR description. |
- Added documentation pointing to PyPi - Replaced boilerplate with helper to_pex_request() # 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]
This PR builds off of the recently added experimental C/C++ targets, by adding the clang-format code formatter.
clang-formatwith--style=fileargument looks for the closest parent directory with a.clang-formator_clang-formatconfiguration file, for each input file. This provides support for multiple.clang-formatconfiguration files in a project hierarchy.If
--style=fileis used, but no.clang-formatfile is found, then the--fallback-style=WebKittakes precedence.In lieu of pulling executables from various sources, or building the
llvmcodebase, this PR uses the clang-format Python package.(Closes issue #15377)
[ci skip-rust]
[ci skip-build-wheels]