Fix: Code and documentation formatting #44
No reviewers
Labels
No labels
bug
cli
core
docs
event
experiment
figure
invariant
metrics
oracle
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
provenance
revocation
tests
workload
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erikinkinen/AES!44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "0-fix-formatting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task
Closes #43
Summary
This PR introduces formatting enforcement in CI to prevent unformatted code and documentation changes from landing on
main. It adds two Forgejo Actions workflows:.clang-format*.mdfiles using a repo-pinned configurationIt also fixes a key mismatch by aligning
.clang-format’s language standard with the actual project language level (C++20), and applies formatting cleanups to existing files so the new checks pass immediately.Motivation
Formatting consistency was previously missed in #2/#42. Relying only on local tooling and pre-commit hooks is not sufficient; CI must provide a hard, repeatable guardrail so
mainremains mechanically consistent.Changes
CI
.forgejo/workflows/clang-format.ymlto verify that tracked C/C++ files matchclang-format -style=file.forgejo/workflows/markdownlint.ymlto lint Markdown in CIConfiguration
.clang-formattoStandard: c++20(wasCpp03).markdownlint.jsonas the repository’s markdown linting policyPre-commit
.pre-commit-config.yaml(keeps local workflow consistent with CI)Mechanical formatting fixes
README.md,docs/phase0.md,docs/model.md,docs/formatting.md.clang-format-consistent formatting to core headers and test sourcesNotes
This is a mechanical-only PR. No semantic behavior or simulator logic changes are introduced.
CI enforcement is intentionally scoped to format-only checks:
clang-formatfor*.{c,cc,cpp,cxx,h,hh,hpp}markdownlintfor**/*.mdThe
.clang-formatstandard was updated to match the project’s compilation level (C++20), so formatting is parsed consistently with the codebase.Verification
clang-format -style=file