Conversation
The linker's -X flag only sets string vars, not consts, so .goreleaser.yaml's version injection was a silent no-op and released binaries always reported 0.1.0. Switching const -> var restores the version stamp for `codeguard version` and the new banner. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Running `codeguard` with no args (or `help`) now shows a devr-blue banner with the current version, an upstream update notice, and the latest CHANGELOG highlights, followed by a task-grouped, aligned command menu that replaces the previous flag-signature dump. - internal/whatsnew: parse latest CHANGELOG section, semver compare, banner render, and a cached (24h) opt-out GitHub release check using the SSRF-guarded safehttp client; disabled under CI / NO_COLOR-aware styling that stays plain when output is redirected. - CHANGELOG.md is embedded via a module-root package (go:embed cannot reach up a directory). - internal/cli/menu.go: grouped command menu; per-command flags moved to `codeguard <command> -h`. - make menu: preview the banner + menu with the real release version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
alxxjohn
added a commit
that referenced
this pull request
Jul 2, 2026
🤖 I have created a release *beep* *boop* --- ## [0.7.0](v0.6.1...v0.7.0) (2026-07-02) ### Features * **cli:** add What's New banner and task-grouped menu ([c1df999](c1df999)) * **cli:** What's New banner and task-grouped menu ([#21](#21)) ([45e56f7](45e56f7)) * execute checks-improvement plan tiers 1-6 ([733862f](733862f)) * **parsers:** tree-sitter TypeScript engine behind parsers.treesitter flag ([5d09161](5d09161)) ### Bug Fixes * **ci:** extract version from var Number in homebrew validation ([01d7a24](01d7a24)) * **ci:** extract version from var Number in homebrew validation ([#23](#23)) ([ec21f3b](ec21f3b)) * **version:** make Number a var so ldflags injection works ([6b1ccad](6b1ccad)) ### Performance Improvements * **scan:** parse/read files once, parallelize sections, scope cache ([d181a4f](d181a4f)) * **scan:** parse/read files once, parallelize sections, scope cache ([#24](#24)) ([c79d9ec](c79d9ec)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
What & why
Running
codeguardwith no args (orhelp) previously printed a plain wall of flag signatures. This adds a What's New banner and reformats the command list into a task-grouped menu, both styled in codeguard's devr blue.What's New banner
CHANGELOG.mdsection (stays in sync with release-please automatically).os.UserCacheDir()/codeguard/update-check.json), disabled whenCODEGUARD_NO_UPDATE_CHECKis set or$CIis present, uses the SSRF-guardedai/safehttpclient with a 1.5s timeout, and fails silent when offline.Menu
codeguard <command> -h; a compact "Common flags" block remains.Styling
RGB 37,169,255, matchingreport/text_banner.go) via sharedwhatsnew.Blue/BlueBold/Fainthelpers.NO_COLOR/TERM=dumband stays plain text when piped or redirected (cleaner than the report package, which always emits ANSI).Bug fix (separate commit)
internal/version.Numberwas aconst, but the linker's-Xflag only sets vars — so.goreleaser.yaml's version injection was a silent no-op and every released binary reported0.1.0. Changed tovar;codeguard versionand the banner now report the injected tag.Tooling
make menupreviews the banner + menu with the real release version (from.release-please-manifest.json), and shows how to disable the update check.Preview
Knowledge captured
.claude/knowledge/architecture-boundaries.md: notes that the usage menu makes one cached, opt-out outbound call, and the module-rootgo:embedconstraint forCHANGELOG.md.Testing
go build ./...,go vet ./...,gofmt -l— cleangolangci-lint run— 0 issuesgo test ./...— all pass (added parsing, semver, cache, GitHub fetcher (httptest), color, and menu-structure tests)🤖 Generated with Claude Code