quality: LICENSE, stricter linting, and coverage improvements - #22
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Code-quality improvements identified by a strict lint/coverage audit:
Repository level
LICENSE— without it pkg.go.dev treats the module as non-redistributable (docs hidden) and most quality scorers penalize itLinting
gocritic/godot/gosec/misspell/nilnil/revive/unconvert/unparamin.golangci.ymland fix all findings (gosec is excluded for_test.go, which only touchest.TempDir())Code
logfile.Statno longer returnsnil, nil; missing files are reported with anErrNotFoundsentinel (idiomatic, catches accidental nil-deref at the type level)cmd/sava, unused params renamed to_, constructors placed before methodsTests / coverage
cmd/sava0% → 83.9%🤖 Generated with Claude Code