Skip to content

style: apply the current pre-commit hooks repo-wide - #39

Merged
thedavidmeister merged 1 commit into
mainfrom
38-precommit-formatter-drift
Sep 20, 2026
Merged

thedavidmeister merged 1 commit into
mainfrom
38-precommit-formatter-drift

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Closes #38.

rainix-sol / static is red on every PR for reasons unrelated to the PR. Its
pre-commit run --all-files step reformats committed files, so the run reports
"files were modified by this hook" and exits 1. This is repo-wide drift: the
workflows are consumed at @main and the hook set comes from the rainix
devshell, so the formatters moved under a repo that did not.

This is the formatting-only commit that re-syncs them.

What changed

  • taplo reindents the REUSE.toml path array from 4 spaces to 2.
  • yamlfmt drops the blank line after the SPDX header in .coderabbitai.yaml.

Nothing else. The REUSE annotation covers exactly the same paths.

Correction to the issue as filed

The issue reports four drifted files, adding .vscode/settings.json and
slither.config.json via a failing prettier-rainix. That half does not
reproduce. prettier-rainix passes both in CI and locally at the rainix rev CI
actually resolved, and only two files drift.

CI on PR #37, run 35505454642, job rainix-sol / static:

prettier-rainix..........................................................Passed
taplo....................................................................Failed
- files were modified by this hook
yamlfmt..................................................................Failed
- files were modified by this hook

with a shown diff touching .coderabbitai.yaml and REUSE.toml only. Local
pre-commit run --all-files on main at 5c165a8, inside
nix develop github:rainlanguage/rainix/8657b83b68f41957ab85da91132c3f652c1f32c0#sol-shell
(the same rev CI resolved), reproduces the same two hooks and a byte-identical
diff. git status --porcelain afterwards is exactly:

 M .coderabbitai.yaml
 M REUSE.toml

The other three static steps -- slither ., forge fmt --check and
forge lint -D warnings -- pass on that run, so the whole failure is the
pre-commit step, as the issue says.

Verification on this branch

Same devshell, same command, after the change:

deadnix..................................................................Passed
denofmt..................................................................Passed
nil......................................................................Passed
nixfmt...................................................................Passed
no-consumer-prettier.....................................................Passed
prettier-rainix..........................................................Passed
rustfmt..............................................(no files to check)Skipped
shellcheck...........................................(no files to check)Skipped
statix...................................................................Passed
taplo....................................................................Passed
yamlfmt..................................................................Passed

git status --porcelain is empty afterwards, so the hook set is now a fixed
point on this tree rather than merely quiet once.

Reverting each changed file to its base bytes, one at a time, and re-running the
whole hook set:

Mutation taplo yamlfmt prettier-rainix
git checkout main -- REUSE.toml Failed Passed Passed
git checkout main -- .coderabbitai.yaml Passed Failed Passed

Each file is killed by exactly one hook and by no other, so neither half of the
diff is inert and neither is doing the other's work. prettier-rainix survives
both, which is the direct check on the issue's four-file claim.

Note for the reviewer

The fix for #36 also edits the REUSE.toml path array (it removes the
.gas-snapshot entry). Both branches are cut from main as asked, so whichever
merges second will conflict in that array. The resolution is mechanical: keep
the 2-space indent from this PR, minus the .gas-snapshot line.

QA

  • Discriminating tests: n/a - the diff is whitespace in two config files and adds no Solidity, so no unit test can discriminate it. The discriminating check is the failing CI step itself, pre-commit run --all-files in the pinned rainix devshell: taplo Failed + yamlfmt Failed on base, all hooks Passed and a clean git status --porcelain on this branch. Both runs transcribed above.
  • Mutations applied: REUSE.toml -> reverted to base bytes -> killed by taplo alone; .coderabbitai.yaml -> reverted to base bytes -> killed by yamlfmt alone. Full table above. Neither half of the diff is inert, and prettier-rainix survives both.
  • Oracle: the hook binaries themselves, pinned at rainix 8657b83b68f41957ab85da91132c3f652c1f32c0, the same rev the failing CI run resolved from @main. The formatting here was produced by running them, not written by hand, and is byte-identical to the diff CI printed in run 35505454642. Independent of any judgment of mine about what the files should look like.
  • Category check: issue asks (a) static stops being red for PR-independent reasons, (b) four named files are the drift, (c) the fix is pre-commit run --all-files committed as a formatting-only change. Covered (a) and (c). (b) is corrected, not covered: only two of the four drift, per the mutation table. The issue's separate observation that slither . and forge fmt --check pass is confirmed by run 35505454642 and needs no change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Reformatted indentation in licensing annotation configuration without changing its contents or behavior.

`rainix-sol / static` runs `pre-commit run --all-files` and has been red on
every PR for reasons unrelated to the PR: two committed files no longer match
what the current hook set produces, so the run reports "files were modified by
this hook" and exits 1.

The workflows are consumed at `@main` and the hooks come from the rainix
devshell, so the formatters moved under a repo that did not. This is the
formatting-only commit that re-syncs them:

- `taplo` reindents the `REUSE.toml` `path` array from 4 spaces to 2.
- `yamlfmt` drops the blank line after the SPDX header in `.coderabbitai.yaml`.

No behaviour changes; the REUSE annotation covers the same paths.

Closes #38

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e3005a9f-8e0f-4f98-8299-99602f2fab46

📥 Commits

Reviewing files that changed from the base of the PR and between 5c165a8 and 9e0b1e2.

📒 Files selected for processing (2)
  • .coderabbitai.yaml
  • REUSE.toml
💤 Files with no reviewable changes (1)
  • .coderabbitai.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The pull request applies formatting changes to REUSE.toml and records no substantive change to .coderabbitai.yaml. The listed paths and annotations remain unchanged.

Changes

Formatter alignment

Layer / File(s) Summary
Formatting updates
.coderabbitai.yaml, REUSE.toml
REUSE.toml path entries are re-indented from four spaces to two spaces. The path list and annotations remain unchanged. No substantive review configuration change is shown.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other · Severity of issue fixed: Medium

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: synchronizing repository formatting with the current pre-commit hooks.
Linked Issues check ✅ Passed Issue #38 requires repository-wide synchronization with the current pre-commit hooks. The PR updates .coderabbitai.yaml by removing the formatter-disallowed blank line and updates REUSE.toml inden…
Out of Scope Changes check ✅ Passed The reported changes are limited to formatting in .coderabbitai.yaml and REUSE.toml. These changes directly implement issue #38. The available summary reports no behavior or public-entity changes …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@thedavidmeister
thedavidmeister merged commit 6fb9019 into main Sep 20, 2026
5 checks passed
thedavidmeister pushed a commit that referenced this pull request Sep 20, 2026
Resolves the `REUSE.toml` conflict: #39 reindented the `path` array from four
spaces to two, and this branch deletes the `.gas-snapshot` entry from it. Kept
#39's two-space indentation for every remaining entry and dropped only the
`.gas-snapshot` line, so the diff against main is the one deletion.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
thedavidmeister pushed a commit that referenced this pull request Sep 20, 2026
Picks up #39 (pre-commit formatter re-sync) and #40 (stale .gas-snapshot
deletion), which is what `rainix-sol / static` was red on: this branch
predates the REUSE.toml/.coderabbitai.yaml formatting fix and the job's
`pre-commit run --all-files` step reformatted them on every run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

rainix-sol / static is red on every PR from pre-commit formatter drift

1 participant