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>
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>