Conversation
Fix errorlint: use errors.Is for sentinel error comparisons (io.EOF,
scheduler.ErrNotRunning) and errors.As for type assertions (*exec.ExitError)
in provider-calibration, daemon, and all three agent packages.
Fix perfsprint: replace fmt.Sprintf("%d") with strconv.Itoa/FormatInt in
budget, report, status, task, provider tests, tmux, and provider-calibration.
Replace fmt.Errorf with errors.New where no format verbs are used.
Fix intrange: use Go 1.22+ integer range syntax in budget progressBar and
config struct iteration loops.
Fix mirror: replace bytes.HasPrefix([]byte(s), []byte(p)) with
strings.HasPrefix in analysis/report.go; replace b.WriteString(string(x))
with b.Write(x) in report.go.
Fix gofumpt: apply formatting (octal literals, var grouping) in config.go
and daemon.go.
Fix godot: add trailing periods to block comments in init.go and install.go.
Fix wastedassign: use var declaration instead of dead empty-string init in
helpers.go and install.go.
Fix prealloc: pre-allocate slices in github.go, td.go, register.go,
audit.go, and stats.go.
Fix forcetypeassert: add checked type assertions in setup_test.go.
Fix errchkjson: check json.Marshal errors in orchestrator_test.go.
Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift
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
errors.Isfor sentinel comparisons (io.EOF,scheduler.ErrNotRunning) anderrors.Asfor type assertions (*exec.ExitError) across 6 filesfmt.Sprintf("%d")withstrconv.Itoa/FormatIntandfmt.Errorf(no verbs) witherrors.Newacross 8 filesbudget.goandconfig.gobytes.HasPrefix([]byte,[]byte)withstrings.HasPrefixinanalysis/report.go;b.WriteString(string(x))→b.Write(x)inreport.goconfig.goanddaemon.goinit.goandinstall.gohelpers.goandinstall.gogithub.go,td.go,register.go,audit.go,stats.gosetup_test.gojson.Marshalerrors inorchestrator_test.goSkipped (intentional)
stats.Duration: Mixed receivers required byjson.Marshaler/json.UnmarshalerinterfacesTest plan
go vet ./...passesgo build ./...passesgo test ./...passes (all 22 test packages)🤖 Generated with Claude Code
Automated by nightshift