Skip to content

Add clang format script and CI check - #30

Merged
Project516 merged 4 commits into
masterfrom
ci/clang-format
Sep 30, 2026
Merged

Project516 merged 4 commits into
masterfrom
ci/clang-format

Conversation

@Project516

@Project516 Project516 commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Adds a format.sh script that formats the shader sources with clang-format, plus a Format workflow that fails a pull request when the shaders are not formatted.

./format.sh rewrites the files in place. ./format.sh --check reports problems and exits nonzero without writing, which is what CI runs.

The CI pins clang-format-18 so a new upstream release cannot reformat the tree and fail unrelated pull requests. The current shaders already match .clang-format, verified with clang-format 18, 19, and 22.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e1743c03-faeb-484b-9d09-dd1ce812ad04

📥 Commits

Reviewing files that changed from the base of the PR and between d447291 and f48a949.

📒 Files selected for processing (2)
  • .github/workflows/format.yml
  • format.sh
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR adds a format.sh script and a GitHub Actions workflow to enforce clang-format on shader files. The main risk is that the workflow installs clang-format-18 but the script invokes clang-format (unversioned), which will not be available on the runner and cause the CI job to fail. The workflow also uses actions/checkout@v7, which may not exist (current stable is v4); this should be verified.


review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict request_changes

Comment thread .github/workflows/format.yml
Comment thread .github/workflows/format.yml
Comment thread format.sh Outdated
Comment thread format.sh
Comment thread .github/workflows/format.yml Outdated
@Project516

Copy link
Copy Markdown
Owner Author

Addressed the first finding, which was right: clang-format-18 only ships the versioned binary, so the script was picking up whatever unversioned clang-format the runner image happened to have, and the pin was doing nothing. The script now reads CLANG_FORMAT (default clang-format) and CI sets it to clang-format-18, so the pin is real.

Not addressing the second finding: actions/checkout@v7 exists, v7.0.1 is the current release, and gradle.yml already pins it on both of its checkout steps.

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR adds a format.sh script and a GitHub Actions workflow to enforce clang-format on shader files. Three issues block this: the workflow uses actions/checkout@v7 which does not exist (current is v4), it does not make format.sh executable before running, and it installs clang-format-18 but the script invokes 'clang-format' which may not be on PATH (the package provides 'clang-format-18').


review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict request_changes

Comment thread .github/workflows/format.yml
Comment thread .github/workflows/format.yml
Comment thread .github/workflows/format.yml

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a format.sh script and GitHub Actions workflow to enforce clang-format on shader sources. The script supports in-place formatting and a --check mode for CI; the workflow pins clang-format-18 to prevent version drift.


review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict approve

@Project516
Project516 merged commit d7c1b9a into master Sep 30, 2026
6 checks passed
@Project516
Project516 deleted the ci/clang-format branch September 30, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant