style: strengthen constructor naming and Params struct rules #19
Reference in New Issue
Block a user
Delete Branch "style/constructor-naming-params"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per sneak's instruction:
New(),From<Something>(), orNewThing()(multi-type packages only)Create,Make,Build,Init)Paramsstruct (orThingParams) for 2+ arguments — no exceptionsctx, bytes) is the only exceptioncontext.Contextdoes not count against the argument limit (already documented)@clawbot needs fmt
59999115b1tod83bd08d4dRework complete — formatting fix
Ran
make fmt(prettier) which rewrapped lines in the constructor naming section ofprompts/CODE_STYLEGUIDE_GO.md. The content is unchanged; only line breaks were adjusted to comply with prettier's prose-wrap rules.make checkpassesdocker build .passesmainCode Review: PR #19 — style: strengthen constructor naming and Params struct rules
Policy Divergences
VIOLATION:
last_modifiednot updated in YAML front matterprompts/CODE_STYLEGUIDE_GO.mdline 3 still readslast_modified: 2026-02-22despite substantive content changes (18 insertions, 5 deletions). REPO_POLICIES.md states:CODE_STYLEGUIDE_GO.mdis cross-project documentation. Its content was modified. Thelast_modifieddate must be updated to reflect the change date.Requirements Checklist
New(),From<Something>(), orNewThing()(multi-type packages only)Create,Make,Build,Init)Paramsstruct (orThingParams) for 2+ arguments — no exceptionsctx, bytes) is the only exceptioncontext.Contextdoes not count against the argument limit (already documented)d83bd08)Build Result
docker build .— PASS (all cached,make checksucceeds)Cheating Check
No changes to Makefile, Dockerfile,
.prettierrc,.prettierignore,.editorconfig,.golangci.yml, CI workflow,package.json, oryarn.lock. Clean.Verdict: ❌ FAIL
The content changes are correct and complete, but the
last_modifiedfront matter inprompts/CODE_STYLEGUIDE_GO.mdmust be updated to today's date per REPO_POLICIES.md. This is a one-line fix.Rework complete —
last_modifieddate fixUpdated
last_modifiedinprompts/CODE_STYLEGUIDE_GO.mdYAML front matter from2026-02-22to2026-03-18per REPO_POLICIES.md requirements.make fmt— no changes needed (already clean)make check— passesdocker build .— passesmainSingle commit:
a8a469e— one-line fix, no other changes.Code Review: PR #19 — style: strengthen constructor naming and Params struct rules
Policy Divergences
No policy violations found.
last_modifiedYAML front matter: ✅ Updated to2026-03-18(was the sole finding from the previous review cycle — now fixed)proseWrap: always): ✅ Passesmake fmt-check.prettierrc,.prettierignore,.editorconfig, CI workflow,package.json, oryarn.lock: ✅ Cleanstyle/constructor-naming-paramsprompts/CODE_STYLEGUIDE_GO.md): ✅ No scope creepRequirements Checklist
New()From<Something>()acceptable for conversion constructorsFromBytes(),FromConfig()examples includedNewThing()for multi-type packages onlyCreate,Make,Build,InitParamsstruct for 2+ argumentsctx, bytes) is the only exceptionfeatureflag.New(true),thing.NewFromReader(r))context.Contextdoes not count against argument limitd83bd08last_modifieddate updated (previous review finding)a8a469eBuild Result
docker build .— PASSRebased onto
main— already up to date, build still passes.Cheating Check
No tooling, linting, or CI configuration modified. Only
prompts/CODE_STYLEGUIDE_GO.mdchanged. Clean.README Consistency
README.md references
CODE_STYLEGUIDE_GO.mdgenerically in the Quick Start commands. No specific constructor naming details in the README that would need updating. ✅ Consistent.Verdict: ✅ PASS
All issue #19 requirements are fully implemented. The previous review's sole finding (
last_modifieddate) has been fixed. Build passes. No policy violations. No scope creep. No cheating.