Repository navigation
🚨 golangci-lint default: all, as strict as possible - #23
Merged
Merged
Conversation
…dedstructfieldcheck
…and funlen to how the codebase is built
…documented results they fight
…ing the state-swapping ones
…naming why they stay linear
# Conflicts: # internal/imagemeta/imagemeta.go
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.
Turns on golangci-lint
default: all. No behavior, public API or CLI output change: the exported declarations (go doc -all .) are identical andBenchmarkOpenFileallocs/op are unchanged.Config
default: all. Globally disabled, each with a written reason in.golangci.yml:exhaustruct(andexhaustruct_v5),wsl/wsl_v5,nlreturn,varnamelen,noinlineerr,testpackage,gosmopolitan,lll,tagalign, plus the deprecatedgomodguard(its v2 stays on).depguardbansio/ioutil,math/randv1,github.com/pkg/errors,golang.org/x/exp,log,encoding/jsonv1 (two tests moved to json/v2; the CLI already used it; goldens unchanged).init(), the registry tables and sentinels (gochecknoglobals), interface seams (ireturn), CLI/ffprobe JSON names (tagliatelle),InPlacePatch's(nil, nil)"does not fit" (nilnil), parser byte offsets (mndin the format packages), internal one-off errors (err113outside the root package).Code
Parse(readChain,addAudioTail), cue indices,vorbis.ParseChapters, the RF64 ds64 pieces, MP3 millisecond parsing, M4Acovredits,imagemeta.MIMEType.Verified:
mise run ci(check, verify-mod, govulncheck, write gate with 120 s fuzz),GOARCH=386 go test ./...,GOOS=windows go vet ./..., and 30 shuffled race runs of the whole suite with no failure (one registry race found and fixed in the process).For the maintainer to confirm: tests carry more relaxations than the four in the standard (
mnd,funlen,err113, gosec G304): gosec G115/G204/G302/G404/G602/G703 in fixture builders,goconstandduploff in tests, and nine large test functions keep a reasonedcyclop/gocognitnolint rather than being split. 39nonamedreturnsnolints share one generic reason.