go-transaction-manager
/
.golangci.yml
132 строки · 3.6 Кб
1linters:2enable:3- asasalint4- bodyclose5- containedctx6- contextcheck7- dogsled8- dupl9- durationcheck10- errchkjson11- errname12- errorlint13- exhaustive14- exhaustruct15- exportloopref # https://github.com/kyoh86/exportloopref#whats-this16- forcetypeassert # https://github.com/gostaticanalysis/forcetypeassert#forcetypeassert17- funlen18- gochecknoglobals19- gochecknoinits20- gocognit21- goconst22- gocritic23- gocyclo24- godot25- err11326- gofmt27- gofumpt28- goimports29- gomoddirectives30- goprintffuncname # https://github.com/jirfag/go-printf-func-name#go-printf-func-name31- grouper32- gosec33- importas34- interfacebloat35- ireturn36- lll37- makezero # https://github.com/ashanbrown/makezero#purpose38- misspell39- nakedret40- nestif41- nilerr # https://github.com/gostaticanalysis/nilerr#nilerr42- nilnil # https://github.com/Antonboom/nilnil#motivation43- nolintlint # https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/nolintlint/README.md#purpose44- paralleltest45- prealloc # https://github.com/alexkohler/prealloc#purpose46- revive47- rowserrcheck48- sqlclosecheck49- stylecheck50- tagliatelle51- tparallel # https://github.com/moricho/tparallel52- unconvert # https://github.com/mdempsky/unconvert#usage53- unparam54- usestdlibvars55- wastedassign56- whitespace57- wsl # https://github.com/bombsimon/wsl/blob/master/doc/rules.md58
59linters-settings:60wsl:61allow-assign-and-anything: true62
63issues:64exclude-dirs:65- trm/manager/mock66- sql/mock67exclude-use-default: false68exclude:69- ST1000 # ST1000: at least one file in a package should have a package comment70exclude-rules:71- linters:72- lll73source: "^//go:generate "74- linters:75- lll76source: "(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+"77- linters:78- lll79source: "// ?TODO "80- path: _test\.go81linters:82- wsl83text: "only cuddled expressions if assigning variable or using from line above"84- path: _test\.go85linters:86- wsl87text: "assignments should only be cuddled with other assignments"88- path: _test\.go89linters:90- revive91text: "seems to be unused, consider removing or renaming it as _"92- path: _test\.go93linters:94- revive95text: "context-keys-type: should not use basic type string as key in context.WithValue"96- path: _test\.go97linters:98- staticcheck99text: "SA1029: should not use built-in type string as key for value; define your own type to avoid collisions"100- path: (.+/)?context\.go101linters:102- ireturn103- path: (.+/)?transaction\.go104linters:105- ireturn106source: \) Begin\(ctx107- path: (.+/)?settings\.go108linters:109- ireturn110source: "(?:EnrichBy|SetPropagation|SetCtxKey|CtxKey|SetCancelable|SetTimeout)"111- linters:112- gochecknoglobals113source: "DefaultCtxGetter"114- &internal_text115path: (^trm/internal|^internal)116text: "var-naming: don't use an underscore in package name"117- <<: *internal_text118text: "package-comments: should have a package comment"119- <<: *internal_text120text: "ST1003: should not use underscores in package names"121- path: (_test\.go|^trm/internal|^internal)122linters:123- funlen124- gochecknoglobals125- goconst126- gomnd127- containedctx128- err113129- errcheck130- nolintlint131- forcetypeassert132- exhaustruct