Skip to content

chore: fix golangci-lint issues in config.go and commit.go - #247

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

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

Conversation

@iamlasse

@iamlasse iamlasse commented Sep 16, 2026 •

Copy link
Copy Markdown

Summary

Fixes the 4 issues reported by golangci-lint (default linters) on current main:

  • config.go: rename deprecated reflect.Ptr to reflect.Pointer (govet inline) in the two type switches.
  • commit.go: replace fmt.Fprintln(os.Stdout, ...) with fmt.Println(...) (errcheck) for stdout output.

No behavior change — style-only fixes.

Toolchain note

golangci-lint v2.12.2 could not analyze the Go 1.27 toolchain (typecheck panic in math/rand/v2); verified with golangci-lint v2.13.2.

Verification

  • golangci-lint run → 0 issues
  • go build ./... → OK
  • go test ./... → all pass
  • gofmt -l . → clean

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
Resolve the 4 issues reported by golangci-lint v2.12.2 (default
linters):

- config.go: rename deprecated reflect.Ptr to reflect.Pointer (govet
'inline') in the two type switches. - commit.go: replace
fmt.Fprintln(os.Stdout, ...) with fmt.Println(...) (errcheck) for stdout
output.

No behavior change; golangci-lint run now reports 0 issues.

Nightshift-Task: lint-fix
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