Skip to content

fix(lint): check Fprintln errors and use reflect.Pointer alias - #246

Open
iamlasse wants to merge 2 commits into
marcus:mainfrom
iamlasse:lint/fix-errcheck-govet-20260914
Open

iamlasse wants to merge 2 commits into
marcus:mainfrom
iamlasse:lint/fix-errcheck-govet-20260914

Conversation

@iamlasse

@iamlasse iamlasse commented Sep 14, 2026 •

Copy link
Copy Markdown

Summary

Fixes all 4 issues reported by make lint (golangci-lint run):

errcheck (2) — cmd/nightshift/commands/commit.go

  • The two fmt.Fprintln(os.Stdout, normalized) calls in commit normalize discarded their error returns. The identical --check and default branches were collapsed and the error is now propagated via RunE.

govet (2) — cmd/nightshift/commands/config.go

  • Replaced the deprecated reflect.Ptr constant with its inline alias reflect.Pointer (available since Go 1.18) in printValue and isZero.

Verification

  • golangci-lint run — 0 issues (was 4)
  • go vet ./... — clean
  • gofmt -l . — clean
  • go build ./... — clean
  • make test — all packages pass

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift


Automated by nightshift

iamlasse added 2 commits June 28, 2026 02:10
Add internal/commits with pure Normalize/validate functions enforcing the project's Conventional Commits rules (known type set, lowercase type, lowercase subject, 72-char subject limit, whitespace trimming, and 72-column body wrapping). Wire it into the CLI as 'nightshift commit normalize' (positional, --file, and stdin sources; --check to validate only), ship a commit-msg git hook under scripts/, and document the format and installation in docs/commit-messages.md.

Nightshift-Task: commit-normalize
Nightshift-Ref: https://github.com/marcus/nightshift

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant