Skip to content

quality: LICENSE, stricter linting, and coverage improvements - #22

Merged
rn404 merged 1 commit into
mainfrom
quality-improvements
Jul 8, 2026
Merged

quality: LICENSE, stricter linting, and coverage improvements#22
rn404 merged 1 commit into
mainfrom
quality-improvements

Conversation

@rn404

@rn404 rn404 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Code-quality improvements identified by a strict lint/coverage audit:

Repository level

  • Add MIT LICENSE — without it pkg.go.dev treats the module as non-redistributable (docs hidden) and most quality scorers penalize it

Linting

  • Enable gocritic / godot / gosec / misspell / nilnil / revive / unconvert / unparam in .golangci.yml and fix all findings (gosec is excluded for _test.go, which only touches t.TempDir())

Code

  • logfile.Stat no longer returns nil, nil; missing files are reported with an ErrNotFound sentinel (idiomatic, catches accidental nil-deref at the type level)
  • Package comment for cmd/sava, unused params renamed to _, constructors placed before methods

Tests / coverage

  • New root-command tests (add/list/clear/--version/error paths): cmd/sava 0% → 83.9%
  • logfile error-path tests (broken JSON, invalid date): 77.8% → 81.0%

🤖 Generated with Claude Code

- Add MIT LICENSE (required by pkg.go.dev redistributability and
  most quality scorers)
- Enable gocritic/godot/gosec/misspell/nilnil/revive/unconvert/unparam
  in golangci-lint (gosec excluded for tests writing into t.TempDir)
- logfile.Stat: replace nil,nil contract with ErrNotFound sentinel
- Add root-command tests: cmd/sava coverage 0% -> 83.9%
- Add logfile error-path tests (broken JSON, invalid date): 77.8% -> 81%
- Fix revive/funcorder findings (package comment, unused params,
  constructor placement)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rn404
rn404 merged commit f3c74d9 into main Jul 8, 2026
2 checks passed
@rn404
rn404 deleted the quality-improvements branch July 8, 2026 10:16
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