Skip to content

chore(lint): fix golangci-lint errors in commands package#183

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

chore(lint): fix golangci-lint errors in commands package#183
iamlasse wants to merge 2 commits into
marcus:mainfrom
iamlasse:chore/lint-fix-20260703

Conversation

@iamlasse

@iamlasse iamlasse commented Jul 3, 2026

Copy link
Copy Markdown

Summary

Behavior-preserving cleanup resolving all golangci-lint errors reported on main.

Before: golangci-lint run ./...4 issues (errcheck ×2, govet ×2)
After: 0 issues

Changes

  • cmd/nightshift/commands/commit.go — two errcheck warnings: explicitly discard the unchecked return value of fmt.Fprintln(os.Stdout, normalized) (_, _ =). No logic change.
  • cmd/nightshift/commands/config.go — two govet inline-constant warnings: reflect.Ptrreflect.Pointer (the reflect.Ptr alias is deprecated). Aliases for the same kind, so behavior is identical.

Verification

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

No logic altered; only lint/style fixes.

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/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 errcheck warnings for unchecked fmt.Fprintln returns in
commit.go and govet inline-constant warnings (reflect.Ptr ->
reflect.Pointer) in config.go. Behavior-preserving cleanup only.

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