feat: add Go profile with fixture and smoke test#28
Conversation
|
This should be gated on target repository configuration, not only on whether The profile README says to run Could you gate this on project config, e.g. |
baskduf
left a comment
There was a problem hiding this comment.
Thanks for adding the Go profile. The scope is narrow, CI is green, and the fixture/profile wiring looks mostly aligned with the profile contribution rules.
I’m requesting one small change before approval: templates/profiles/go/check_harness.py should only run golangci-lint when the target repository has a golangci-lint config. Right now it runs whenever the binary exists globally, which makes the suggested harness depend on machine environment rather than target repo configuration.
Non-blocking: README still does not show a Go profile badge/list entry even though docs/profiles.md and docs/validation.md were updated. I would prefer adding it, but the lint gating is the only blocker for me.
lint_configs = (".golangci.yml", ".golangci.yaml", ".golangci.toml")
if shutil.which("golangci-lint") and any((ROOT / name).exists() for name in lint_configs):
run(["golangci-lint", "run"])Gate golangci-lint execution on the presence of a project-level config (.golangci.yml, .golangci.yaml, or .golangci.toml) so the harness result depends on target repo evidence, not the reviewer's environment. Also add Go profile badge to README.md shields section.
|
Applied both changes in a8fde7e:
|
|
Thanks, the requested blocker is fixed in a8fde7e and Harness Check is green. One small docs cleanup before approval: Suggested wording:
Also please include |
Add .golangci.yaml to the Recommended Checks line alongside .golangci.yml and .golangci.toml, and update the Suggested Check Script description to reflect that golangci-lint runs only when a config file is present.
|
Fixed in e720c35:
|
baskduf
left a comment
There was a problem hiding this comment.
Thanks, this looks good now. The lint gating is tied to target repo config, the Go profile README matches the implementation, and Harness Check is green.
Approved.
Summary
Adds a Go stack profile and the supporting fixture and smoke test coverage
required by the profile contribution guidelines.
templates/profiles/go/README.mdwith conditional guidance for Gomodules:
go build,go vet,golangci-lintwhen configured,go test,generated file protection (sqlc, protoc, mockgen, templ, stringer), and
go mod tidy/go.sumhandling.templates/profiles/go/check_harness.pythat runsgo build ./...,go vet ./...,golangci-lint runwhen available,go test -count=1 ./...,and the generic drift checks.
templates/profiles/go/gitignore.harness.txtwith Go build output,optional vendor directory, and kit clone entries.
tests/fixtures/go-basic/with a minimalgo.modfor smoke testing.go-basicscenario totests/test_smoke_fixtures.py.goto the profile choices inscripts/apply_harness.py.vendorandvendor/toOPTIONAL_REFERENCESinscripts/check_docs_drift.pyand its generic template copy so Go profileguidance referencing the vendor directory does not trigger false positives.
docs/profiles.mdanddocs/validation.mdto list the Go profile.Closes #5
Test plan
python -m unittest discover -s tests— 117 passed, 1 skippedpython scripts/check_docs_drift.py— passespython scripts/check_structure.py— passespython scripts/check_failure_memory.py— passespython scripts/check_decision_memory.py— passes