lint fails on a clean tree: 45 naming findings contradict the PascalCase rule in AGENTS.md #36

Open
opened 2026-10-06 13:25:47 +00:00 by jorijnvdgraaf · 0 comments

Summary

./bin/crafter-build lint exits 1 at c6b0bba (run with unrelated local changes in four files; none of the findings is in a changed line):

45 finding(s) in 26 of 51 files (17 rules)

All 45 come from the naming rule and read variable 'X' should be camelCase. format --check is clean.

The disagreement

The flagged names are namespace-scope statics and constants written in PascalCase, which is what AGENTS.md:99 asks for: "PascalCase for types, functions, statics and constants; camelCase for variables". Examples:

Where Declaration
tests/VariantId/main.cpp:9 and 16 other tests std::int32_t Failures = 0; in an unnamed namespace
implementations/Crafter.Build-Shader.cpp:75 constexpr EShMessages Messages = …
interfaces/Crafter.Build-Clang.cppm:168 inline constexpr std::size_t LintNoParent = …
implementations/Crafter.Build-Progress.cpp StateMutex, StartTime, LineDirty, IsTty, … (8 findings)

So the code follows the documented convention and the rule (from Crafter.LintRules, which is fetched unpinned) flags it.

Why it matters

AGENTS.md says a change is not done until format, lint and test all exit 0. With lint failing on a clean tree that gate cannot be met, and a new finding hides among the 45.

Suggested fix

Pick one side:

  • teach the naming rule that namespace-scope variables, static variables and constexpr constants are PascalCase, or
  • rename the 45 and change the sentence in AGENTS.md.

Then re-enable the lint step in CI so it stays at zero.

## Summary `./bin/crafter-build lint` exits 1 at `c6b0bba` (run with unrelated local changes in four files; none of the findings is in a changed line): ``` 45 finding(s) in 26 of 51 files (17 rules) ``` All 45 come from the `naming` rule and read `variable 'X' should be camelCase`. `format --check` is clean. ## The disagreement The flagged names are namespace-scope statics and constants written in PascalCase, which is what `AGENTS.md:99` asks for: "`PascalCase` for types, functions, statics and constants; `camelCase` for variables". Examples: | Where | Declaration | |---|---| | `tests/VariantId/main.cpp:9` and 16 other tests | `std::int32_t Failures = 0;` in an unnamed namespace | | `implementations/Crafter.Build-Shader.cpp:75` | `constexpr EShMessages Messages = …` | | `interfaces/Crafter.Build-Clang.cppm:168` | `inline constexpr std::size_t LintNoParent = …` | | `implementations/Crafter.Build-Progress.cpp` | `StateMutex`, `StartTime`, `LineDirty`, `IsTty`, … (8 findings) | So the code follows the documented convention and the rule (from Crafter.LintRules, which is fetched unpinned) flags it. ## Why it matters `AGENTS.md` says a change is not done until `format`, `lint` and `test` all exit 0. With lint failing on a clean tree that gate cannot be met, and a new finding hides among the 45. ## Suggested fix Pick one side: - teach the `naming` rule that namespace-scope variables, `static` variables and `constexpr` constants are PascalCase, or - rename the 45 and change the sentence in `AGENTS.md`. Then re-enable the lint step in CI so it stays at zero.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Catcrafts/Crafter.Build#36
No description provided.