What changed, and why it matters
This commit only adds a code-formatting check to the project's continuous integration (CI) pipeline and updates the contributor guide to explain the formatting policy. It does not change any production code, cryptographic logic, network handling, or data parsing. There is no security issue here.
No security action needed. This is a normal CI/process improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds a ‘fmt –check’ task to the GitHub Actions workflow matrix in .github/workflows/rust.yml and adds a ‘Note on formatting’ section to CONTRIBUTING.md. No Rust source files, dependencies, build scripts, or unsafe code are modified. The change is purely process/tooling.
Changed components
.github/workflows/rust.ymlCONTRIBUTING.mdInspect captured patch +14 / −1
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 3ef78537..57561ea8 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- task: [lint, docs, docsrs, bench]
+ task: [lint, docs, docsrs, bench, "fmt --check"]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 97f6ad43..ae77b731 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -190,6 +190,19 @@ adhere to the ideas presented in the following two blog posts:
- [How to Write a Git Commit Message](https://cbea.ms/git-commit/)
- [Write Better Commits, Build Better Projects](https://github.blog/2022-06-30-write-better-commits-build-better-projects/)
+Note on formatting:
+
+- We attempt to keep the codebase formatted but it is not a merge pre-requisite.
+- `master` may not format cleanly, if so please throw a formatting patch at the
+ front of your PR if you plan on formatting your changes. I.e., don't include
+ arbitrary formatting changes in your other patches.
+- You can use `just fmt`.
+- Remember to use nightly if your editor runs the formatter (`cargo +nightly fmt`).
+- There is a CI job that runs the formatter.
+- There is a _very_ long history on the reasons for all this. Sorry this is the
+ best solution we have been able to come up with to keep all parties somewhat
+ happy.
+
### Deprecation and Versioning
Whenever any part of your code wants to mention the version number the code will
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.