Слияние кода завершено, страница обновится автоматически
# Documentation: https://golangci-lint.run/usage/configuration/
linters-settings:
gosec:
excludes:
- G601
exclude-generated: true
errcheck:
exclude-functions:
- (*github.com/tektoncd/pipeline/vendor/go.uber.org/zap.SugaredLogger).Sync
- flag.Set
- os.Setenv
- logger.Sync
- fmt.Fprintf
- fmt.Fprintln
- (io.Closer).Close
- updateConfigMap
gomodguard:
blocked:
modules:
- github.com/ghodss/yaml:
recommendations:
- sigs.k8s.io/yaml
depguard:
rules:
prevent_unmaintained_packages:
list-mode: lax # allow unless explicitely denied
files:
- $all
- "!$test"
allow:
- $gostd
deny:
- pkg: io/ioutil
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
- pkg: github.com/ghodss/yaml
desc: "use sigs.k8s.io/yaml instead, to be consistent"
linters:
enable:
- bodyclose
- containedctx
- decorder
- depguard
- dogsled
- dupword
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- goconst
- gocritic
- gofmt
- goimports
- gomodguard
- gosec
- gosimple
- govet
- maintidx
- makezero
- misspell
- musttag
- nakedret
- nilerr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- thelper
- typecheck
- unconvert
- unused
- usestdlibvars
- whitespace
disable:
- cyclop
- dupl
- exhaustruct
- forcetypeassert
- funlen
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- gocyclo
- godot
- godox
- err113
- gofumpt
- gomoddirectives
- iface
- ireturn
- lll
- mnd
- nestif
- nlreturn
- nonamedreturns
- paralleltest
- prealloc
- predeclared
- recvcheck
- revive
- staticcheck
- stylecheck
- tagliatelle
- testpackage
- tparallel
- unparam
- varnamelen
- wastedassign
- wrapcheck
- wsl
# Enabling presets means that new linters that we automatically adopt new
# linters that augment a preset. This also opts us in for replacement linters
# when a linter is deprecated.
presets:
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
- style
- test
- unused
issues:
uniq-by-line: false
# Note: path identifiers are regular expressions, hence the \.go suffixes.
exclude-rules:
- path: main\.go
linters:
- forbidigo
- path: test/build_logs\.go
linters:
- typecheck
- path: _test\.go
linters:
- dogsled
- errcheck
- goconst
- gosec
- ineffassign
- maintidx
- typecheck
- path: test/pipelinerun_test\.go
linters:
- unused
- path: pkg/apis/config/feature_flags_test\.go
linters:
- containedctx
- path: pkg/pipelinerunmetrics/injection\.go
linters:
- containedctx
- path: pkg/pod/pod\.go
linters:
- maintidx
- path: pkg/pod/creds_init_test\.go
linters:
- containedctx
- path: pkg/reconciler/pipelinerun/pipelinerun\.go
linters:
- maintidx
- path: pkg/taskrunmetrics/injection\.go
linters:
- containedctx
- path: test/controller\.go
linters:
- containedctx
- path: internal/sidecarlogresults/sidecarlogresults\.go
linters:
- musttag
- path: internal/sidecarlogresults/sidecarlogresults_test\.go
linters:
- errchkjson
- path: pkg/apis/pipeline/v1.*/param_types\.go
linters:
- musttag
- path: pkg/resolution/resolver/framework/testing/fakecontroller\.go
linters:
- contextcheck
- path: pkg/pipelinerunmetrics/metrics\.go
linters:
- contextcheck
- path: pkg/reconciler/pipelinerun/pipelinerun\.go
linters:
- contextcheck
max-issues-per-linter: 0
max-same-issues: 0
include:
# Enable off-by-default rules for revive requiring that all exported elements have a properly formatted comment.
- EXC0012 # https://golangci-lint.run/usage/false-positives/#exc0012
- EXC0014 # https://golangci-lint.run/usage/false-positives/#exc0014
exclude-files:
- .*/zz_generated.deepcopy.go
- pkg/apis/pipeline/v1beta1/openapi_generated.go
exclude-dirs:
- vendor
- pkg/client
- pkg/spire/test
run:
issues-exit-code: 1
build-tags:
- e2e
timeout: 20m
modules-download-mode: vendor
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )