Repository navigation
Code health: lexical C++ style checks on added lines - #94
Merged
Merged
Conversation
…rface check A class nested in another class, or in a detail or anonymous namespace, is an implementation detail such as a type-erasure base, not an interface others implement. MoveOnlyFunction's private Callable base was flagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Check the lines a change adds for the upstream bans (std::filesystem, std::thread, std::mutex, std::async), control-flow brace formatting, and the Abseil tips adopted in the fork's C++ style notes: mutable globals (#103), new/delete (#126), std::bind (#108), return std::move(local) (#120), top-level const by-value header parameters (#109), bool parameters (#94), header using-directives (#153) and forward declarations. A comment that describes a neighbouring function is an advisory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
marked this pull request as ready for review
October 31, 2026 19:22
dayfine
added a commit
that referenced
this pull request
Oct 31, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
added a commit
that referenced
this pull request
Oct 31, 2026
choose_launch_wait() now takes the previous GameLaunch, and start_game_before_home() takes the LaunchWait it returns, so neither has two bool parameters (code health, TotW #94). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine
added a commit
that referenced
this pull request
Nov 1, 2026
* Code health: skip nested and detail classes in the single-method interface check (#82) A class nested in another class, or in a detail or anonymous namespace, is an implementation detail such as a type-erasure base, not an interface others implement. MoveOnlyFunction's private Callable base was flagged. Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Code health: lexical C++ style checks on added lines (#94) * Code health: skip nested and detail classes in the single-method interface check A class nested in another class, or in a detail or anonymous namespace, is an implementation detail such as a type-erasure base, not an interface others implement. MoveOnlyFunction's private Callable base was flagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E * Code health: lexical C++ style checks on added lines Check the lines a change adds for the upstream bans (std::filesystem, std::thread, std::mutex, std::async), control-flow brace formatting, and the Abseil tips adopted in the fork's C++ style notes: mutable globals (#103), new/delete (#126), std::bind (#108), return std::move(local) (#120), top-level const by-value header parameters (#109), bool parameters (#94), header using-directives (#153) and forward declarations. A comment that describes a neighbouring function is an advisory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * code_health: match functions to their base by name, not by signature (#95) Changing a parameter's type (std::function to MoveOnlyFunction in #90) changed the function's key, so an existing 133-line constructor was held to the new limit of 50 instead of its base length. Functions now match on their qualified name without parameters; messages still show the full signature. Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Settings: default audio display and collapsed console settings Two global settings for people who run many programs on one lab machine: "Default Audio Display" (Audio Pipeline group) is what a program's console shows for its audio until that console's own setting is saved, so a new panel no longer opens with the frequency bars; and "Start with console settings collapsed" folds each program's "Console N Settings" box at creation, so the video is at the top. Both default to today's behavior. AudioOption takes its initial display type from the global setting instead of a fixed FREQ_BARS; a panel's saved value still wins. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E (cherry picked from commit 92d1ed3c6f6fa0468827ab15c51ec3cc71f01d32) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dayfine
added a commit
that referenced
this pull request
Nov 1, 2026
…104) * Code health: skip nested and detail classes in the single-method interface check (#82) A class nested in another class, or in a detail or anonymous namespace, is an implementation detail such as a type-erasure base, not an interface others implement. MoveOnlyFunction's private Callable base was flagged. Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E * Code health: lexical C++ style checks on added lines (#94) * Code health: skip nested and detail classes in the single-method interface check A class nested in another class, or in a detail or anonymous namespace, is an implementation detail such as a type-erasure base, not an interface others implement. MoveOnlyFunction's private Callable base was flagged. Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E * Code health: lexical C++ style checks on added lines Check the lines a change adds for the upstream bans (std::filesystem, std::thread, std::mutex, std::async), control-flow brace formatting, and the Abseil tips adopted in the fork's C++ style notes: mutable globals (#103), new/delete (#126), std::bind (#108), return std::move(local) (#120), top-level const by-value header parameters (#109), bool parameters (#94), header using-directives (#153) and forward declarations. A comment that describes a neighbouring function is an advisory. Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --------- * code_health: match functions to their base by name, not by signature (#95) Changing a parameter's type (std::function to MoveOnlyFunction in #90) changed the function's key, so an existing 133-line constructor was held to the new limit of 50 instead of its base length. Functions now match on their qualified name without parameters; messages still show the full signature. Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E * Settings: default audio display and collapsed console settings Two global settings for people who run many programs on one lab machine: "Default Audio Display" (Audio Pipeline group) is what a program's console shows for its audio until that console's own setting is saved, so a new panel no longer opens with the frequency bars; and "Start with console settings collapsed" folds each program's "Console N Settings" box at creation, so the video is at the top. Both default to today's behavior. AudioOption takes its initial display type from the global setting instead of a fixed FREQ_BARS; a panel's saved value still wins. Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E (cherry picked from commit 92d1ed3c6f6fa0468827ab15c51ec3cc71f01d32) --------- (cherry picked from commit 0e737fb) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Depends on #82
Adds the mechanical rules from the C++ style notes (#93, "Checkable → Could add to code_health") to
devtools/code_health, checked only on lines a change adds.style.py: a lexer that blanks comments, literals and preprocessor lines, with a brace-scope stack for namespace/class/function scope. No clang dependency.std::filesystem,std::thread,std::*mutex/condition_variable,std::async, with the wrapper directories exempt); control-flow formatting () {,} else,namespace X {, next-line braces, one-line bodies); non-const namespace-scope variables andextern(TotW Lab: set up lab/main, the base for lab builds (#92) #103);new/deleteoutside allocators and Qt files (Design: FRLG AutoStory events beyond Brock #126);std::bind(ScreenMachine: a closed loop over known screens #108);return std::move(local)(FRLG: AutoStory, FireRed from a new game to the Boulder Badge #120); top-levelconstby-value parameters in header declarations (BDSP navigation: tile grids and map sets #109); a defaultedboolor 2+boolparameters (Code health: lexical C++ style checks on added lines #94);using namespaceat namespace scope in a header (Design: the AutoStory demo plan and FRLG sizing, next to the architecture doc #153); forward declarations in new headers.save_game's comment aboveadd_wrapped_log).boolsignature whose line moved is not reported either.Testing
python -m unittest discover -s devtools/code_health/tests: 76 pass (26 new intest_style.py, one new CLI case).operator==, primary templates, nested member structs, comment cross-references).🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E