Skip to content

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

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

chore: fix golangci-lint issues in config.go and commit.go#200
iamlasse wants to merge 2 commits into
marcus:mainfrom
iamlasse:chore/lint-fix-20260728

Conversation

@iamlasse

@iamlasse iamlasse commented Jul 28, 2026

Copy link
Copy Markdown

Resolves the 4 issues reported by golangci-lint v2.12.2 (default enabled linters):

govet inlineconfig.go

  • Line 373: case reflect.Ptr:case reflect.Pointer:
  • Line 411: case reflect.Ptr, reflect.Interface:case reflect.Pointer, reflect.Interface:

The reflect.Ptr constant is deprecated in favor of the modern alias reflect.Pointer. Same value, no behavior change.

errcheckcommit.go

  • Lines 55 & 58: fmt.Fprintln(os.Stdout, normalized)fmt.Println(normalized)

Functionally equivalent for stdout and eliminates the unchecked error return.

Verification

  • golangci-lint run → 0 issues (exit 0)
  • go build ./... → pass
  • go test ./... → all 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
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
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