Commit graph Crafter.LintRules/project.cpp
Author SHA1 Message Date
7d93289201
fix: drop the depArgs reference the lite rework left behind
42a2701 removed the depArgs declaration together with the --local
branch it fed, but the GitProject call that remained still passed
.args = depArgs. project.cpp stopped compiling, and with it every load
of this repository: crafter-build's own project.cpp pulls it in through
#pragma crafter dependency, so its build, lint and test runs fail as
soon as the clone is updated.

The call now passes no args. The test's crafter-build dependency only
needs the host defaults, and crafter-build is about to forward a
project's own args to its sibling projects by default anyway. The
comment above it still described the --local checkout the same commit
removed; it now says what the code does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 02:44:46 +01:00
42a27016e3
lint rules lite 2026-10-31 02:21:19 +01:00
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
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