Repository navigation
Disable exhaustruct_v5 and noinlineerr in the default golangci-lint configuration - #2
Merged
Merged
Conversation
…onfiguration exhaustruct is deprecated in golangci-lint v2.13.2 in favour of exhaustruct_v5; the migrated file disabled only the old name, so default: all kept the successor on, the same oversight the wsl / wsl_v5 hand edit already corrected. noinlineerr, added after upstream froze, rejects the if err := f(); err != nil form that upstream's code and the snapshot-imported Satellites use throughout; ADR-0001's verbatim import cannot restyle them. Found by the fetch Satellite (wand #39), the first module linted against this configuration with struct literals in it.
5 tasks
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.
Why
Linting the first Satellite with struct literals in it (
headlesslab/fetch, wand #39) against the default configuration produced two classes of findings the configuration never meant to raise:exhaustruct_v5(15 findings, one of them on azip.FileHeaderliteral that would need all 15 fields). golangci-lint v2.13.2 deprecatesexhaustructin favour ofexhaustruct_v5; the migrated file disables only the old name, sodefault: allkeeps the successor on. Same oversight thewsl/wsl_v5hand edit already corrected.noinlineerr(24 findings). Added to golangci-lint after upstream froze; it rejects theif err := f(); err != nilform that upstream's code and the four snapshot-imported Satellites of #38 use throughout, and ADR-0001's verbatim import cannot restyle them.What
.golangci.yml:exhaustruct_v5disabled next toexhaustruct,noinlineerrdisabled, header comment lists both as hand edits four and five.The smoke module has no struct literals or inline errors, so the smoke run cannot show the difference; the fetch Satellite's lint job will, once its repository exists and pins the merge commit.