Skip to content
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 shortcuts to Pigweed formatters #2351

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

armandomontanez
Copy link
Contributor

Adds commands to easily run Pigweed's formatters:

  • bazel run //tools:format_code
  • bazel run //tools:check_code_formatting

Adds commands to easily run Pigweed's formatters:

* bazel run //tools:format_code
* bazel run //tools:check_code_formatting
@armandomontanez
Copy link
Contributor Author

Needs a .clang-format config file at the root for clang-format to pick up. I'm biased, but my suggestion would be use Pigweed's as a starting point and then just tweak options to your liking.

@lurch
Copy link
Contributor

lurch commented Mar 13, 2025

Adds commands to easily run Pigweed's formatters:

  • bazel run //tools:format_code

The comment in the code says bazelisk run //tools:format_code ?

@armandomontanez
Copy link
Contributor Author

The right answer is bazelisk, I just have bazel as an alias for bazelisk so I have a habit of typing that.

Also, this was put up as a WIP to discuss/demo live sometime in the future. While I find it handy for formatting the Bazel build files, it can format C/C++/Python files too. (I wasn't expecting anyone to pay any mind to it while it was marked as a draft)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants