Skip to content

Code health: ban char*, prefix overloads, and too many header names - #322

Merged
dayfine merged 1 commit into
agentsfrom
notes/code-health-312-rules
Nov 10, 2026
Merged

dayfine merged 1 commit into
agentsfrom
notes/code-health-312-rules

Conversation

@dayfine

@dayfine dayfine commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Base: agents; no parent PRs; the diff shows only this change.

The review of #312 asked for three style rules as lint checks. Code Health now fails char* / char[] types on added lines (not unsigned char, casts or main), fails a header overload pair whose parameter types are a strict prefix of each other when either is new (use a default argument or std::optional), and counts public namespace-scope names per header: 8 hard, 7-8 advisory, new headers at the limit and changed ones no higher than their base. The two style rules accept a justified allow tag on or above the flagged line; header_symbols takes a file-level tag. AGENTS.md "C++ style" gets matching bullets, and the README tables list the checks.

Testing: new test_header_api suite plus a CLI case; full linter self-tests (130) and both harness checks pass. Run against the story-engine branch (base origin/nav/shared) it reports the checkpoint_start_line and build_story_checkpoint overload pairs, six const char* sites, and Pokemon_StoryStepExecutor.h at 9 names.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

Three rules from the review of #312: no char*/char[] types on added lines,
no header overload pair whose parameters are a strict prefix of the
other's (use a default argument or std::optional), and at most 8 public
namespace-scope names per header (7-8 advisory, base comparison like
public methods). The two style rules take a justified allow tag on or
above the flagged line; header_symbols takes a file-level tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine
dayfine marked this pull request as ready for review November 10, 2026 06:50
@dayfine
dayfine merged commit 025f09a into agents Nov 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant