Repository navigation
code_health: class-size and include-layering checks, base from upstream merge-base - #70
Merged
Merged
Conversation
Comparing with a stale fork main reported upstream changes as the branch's own. Without --base-ref, use git merge-base HEAD upstream/main (origin/main when there is no upstream remote) and print the base used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Count public methods (limit 7, advisory above 5), public non-static data in classes with mutating methods, and single-method interfaces, with a lexical member scan over lizard's tokens. Classes are compared with the base like functions, so only new violations and growth fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Fail when a change adds an #include of Pokemon/, PokemonBDSP/ or VideoGames/ to Common, CommonFramework or CommonTools. config.py lists game and platform top-level directories; a test keeps the list complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Runs over origin/main~20..main reported legacy classes far over the public-method limit as advisory, and a public const type field as mutable data. Advise only for 6-7 methods and exempt const fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The incremental check compared against whatever --base-ref we passed, and a stale fork main made upstream changes look like ours. Without --base-ref it now uses the merge-base with upstream/main (falling back to origin/main) and prints it. It also adds class checks in the same incremental style (a single pure-virtual-method interface should be a callable, at most 7 public methods, no public mutable data in classes with methods) and fails new includes of game modules from Common/, CommonFramework/ and CommonTools/. Checker tests pass (41); run against #59, #61, #66, #67 and the last 20 upstream commits, it flagged only real growth, e.g. OverworldMap in #67 with 20 public methods.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E