Conversation
Add build.sh subcommands to run CI-aligned black and clang-format, and add scripts that locate the expected formatter binaries. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
Contributor
|
I think for black we can just add the command line arguments to pyproject.toml, no script needed. Then you can just call black. And it's easier to maintain than adding a build.sh to fvdb-reality-capture. |
Contributor
|
PR #592 adds |
Contributor
|
Because the commit on this branch isn't signed and I wouldn't be able to force push a history rewrite up to the fork repo, I'm opening #769 to finish this out by addressing the notes to remove the |
swahtz
added a commit
that referenced
this pull request
Sep 10, 2026
## Summary Adds `./build.sh format`, a single command that formats the repo the way CI checks it, and fixes the existing clang-format script. - `./build.sh format` runs clang-format over `src/` and then black over the repo. `./build.sh format check` reports violations without rewriting files and exits non-zero, matching the CI codestyle jobs. - Black reads its settings from the `[tool.black]` section in `pyproject.toml` added in #592, so this PR duplicates no black flags. - `src/scripts/run_clang_format.sh` previously had its shebang after the license header, only worked when invoked from `src/scripts`, and did not pass `-style=file`. It now walks `src/` with the same extensions CI uses, prefers `clang-format-18` (which `env/dev_environment.yml` provides), warns when another version is used, and supports `check` mode. Supersedes #449. Per the discussion there, the standalone black script is dropped in favor of the pyproject config. ## Testing - `./build.sh format bogus` and `./build.sh format check extra` reject the arguments. - `./build.sh format check` runs clang-format in dry-run mode and reports violations, then runs black in check mode. Exit code is non-zero if either reports a problem. - `./build.sh format` rewrites files in place. With a local clang-format 21 the version warning fires and the reformat differs from CI, which is why the warning exists. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Jonathan Swartz <jonathan@jswartz.info> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary