Skip to content

chore: fix lint issues (errcheck, govet) - #243

Open
iamlasse wants to merge 2 commits into
marcus:mainfrom
iamlasse:chore/lint-fix-20260910
Open

chore: fix lint issues (errcheck, govet)#243
iamlasse wants to merge 2 commits into
marcus:mainfrom
iamlasse:chore/lint-fix-20260910

Conversation

@iamlasse

@iamlasse iamlasse commented Sep 10, 2026

Copy link
Copy Markdown

Summary

Fixes the 4 issues reported by golangci-lint run (errcheck + govet defaults, as run by CI's golangci-lint-action@v6):

  • errcheck (cmd/nightshift/commands/commit.go:55,58): replaced the unchecked fmt.Fprintln(os.Stdout, normalized) calls with fmt.Println(normalized), matching the surrounding codebase idiom (fmt.Printf is used unchecked elsewhere and is excluded by errcheck defaults).
  • govet inline (cmd/nightshift/commands/config.go:373,411): replaced the deprecated constant reflect.Ptr with its canonical alias reflect.Pointer (identical value, no behavior change).

Verification

  • gofmt -l . — clean
  • go build ./... — ok
  • golangci-lint run — 0 issues
  • go 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
- Replace unchecked fmt.Fprintln(os.Stdout, ...) with fmt.Println in
commit.go to satisfy errcheck - Replace deprecated reflect.Ptr with
reflect.Pointer in config.go to satisfy govet

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift
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