Skip to content

fix(cli): stop after global help#552

Open
floze-the-genius wants to merge 1 commit into
Boeing:feat/3.0from
floze-the-genius:fix/help-exits-without-check
Open

fix(cli): stop after global help#552
floze-the-genius wants to merge 1 commit into
Boeing:feat/3.0from
floze-the-genius:fix/help-exits-without-check

Conversation

@floze-the-genius

Copy link
Copy Markdown

Summary

  • return immediately when global flag parsing reports flag.ErrHelp
  • add unit and testscript coverage for cfv --help
  • document the user-visible fix in the changelog

Reproduction

While testing the v3 release candidate for #551, running cfv --help printed usage and then continued into the default check command. In a directory containing invalid configuration files, help therefore emitted validation results and exited with status 1.

After this change, cfv --help prints usage, performs no validation, and exits 0.

Validation

  • go vet ./...
  • test -z "$(gofmt -s -l -e .)"
  • golangci-lint run ./... (0 issues)
  • go generate ./pkg/filetype/...
  • go build -o /dev/null cmd/cfv/cfv.go
  • go test -cover -coverprofile coverage.out ./...
  • go tool cover -func coverage.out | grep total (91.0%)

@floze-the-genius
floze-the-genius requested a review from a team as a code owner July 19, 2026 04:01
@kehoecj kehoecj added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed v3.0 Work specifically targeted version 3 OSS Community Contribution Contributions from the OSS Community waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers and removed good first issue Good for newcomers help wanted Extra attention is needed labels Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working OSS Community Contribution Contributions from the OSS Community v3.0 Work specifically targeted version 3 waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants