Commit graph

4 commits

Author SHA1 Message Date
e906f797da
fix: wire the HouseRules test only when this is the top-level project
crafter-build loads this project file as a `#pragma crafter dependency`
of its own project.cpp. The HouseRules test pulls crafter-build in via
GitProject so it can run the linter in-process, which from inside
crafter-build means loading crafter-build's project.cpp a second time,
which loads this file a second time, and the cycle guard throws. Every
crafter-build invocation that loads its project.cpp has failed since
the test was wired.

Guard the test with IsTopLevelProject(), which crafter-build exposes
for exactly this: it is false while a project file runs as somebody
else's dependency. Consumers never needed the test; only `crafter-build
test` run in this repository does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-02 21:58:44 +02:00
11f914aada
final new line 2026-10-02 20:43:43 +02:00
b51a5bffb0
changed rule 2026-10-02 20:42:21 +02:00
88139fc0fc
Initial import: the house-style lint rules as a crafter-build module
Moved out of Crafter.Build's lint-rules.h so a project.cpp pulls them in
with `#pragma crafter dependency` + `import Crafter.LintRules;` instead of
copying a header. The rule bodies are unchanged; format-concat now sits
with the other transforms (it rewrites, it was registered as a report),
and the helpers are module-internal. tests/HouseRules moved along with
the rules and links crafter-build from git, or the sibling checkout with
--local.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-02 20:03:24 +02:00