scorecard/.golangci.yml

139 lines
2.6 KiB
YAML
Raw Normal View History

---
run:
concurrency: 6
deadline: 5m
issues:
# Maximum issues count per one linter.
# Set to 0 to disable.
# Default: 50
max-issues-per-linter: 0
# Maximum count of issues with the same text.
# Set to 0 to disable.
# Default: 3
max-same-issues: 0
new-from-rev: ""
2021-05-24 06:51:52 +03:00
skip-files:
- cron/data/request.pb.go # autogenerated
linters:
disable-all: true
enable:
- asciicheck
- depguard
- dogsled
- errcheck
2021-05-30 07:21:43 +03:00
- errorlint
- exhaustive
- exportloopref
2021-05-24 06:51:52 +03:00
- gci
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
2021-05-22 20:29:18 +03:00
- lll
- makezero
- misspell
- nakedret
- nestif
- predeclared
- staticcheck
- stylecheck
- thelper
- typecheck
- unconvert
- unused
- whitespace
- wrapcheck
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
errorlint:
# TODO remove this when project migrates to golang 1.20
# https://golangci-lint.run/usage/linters/#errorlint
errorf-multi: false
exhaustive:
# https://golangci-lint.run/usage/linters/#exhaustive
default-signifies-exhaustive: true
govet:
enable:
- fieldalignment
godox:
keywords:
- BUG
- FIXME
- HACK
2021-05-24 06:51:52 +03:00
gci:
2022-02-20 00:14:22 +03:00
sections:
- standard
- default
- prefix(github.com/ossf/scorecard)
gocritic:
enabled-checks:
# Diagnostic
- appendAssign
- badCond
- caseOrder
- codegenComment
- commentedOutCode
- deprecatedComment
- dupBranchBody
- dupCase
- dupSubExpr
- exitAfterDefer
- flagName
- nilValReturn
- weakCond
- octalLiteral
# Performance
- appendCombine
- hugeParam
- rangeExprCopy
- rangeValCopy
# Style
- boolExprSimplify
- captLocal
- commentFormatting
- commentedOutImport
- defaultCaseOrder
- docStub
- elseif
- emptyFallthrough
- hexLiteral
- ifElseChain
- methodExprCall
- singleCaseSwitch
- typeAssertChain
- typeSwitchVar
- underef
- unlabelStmt
- unlambda
# Opinionated
- builtinShadow
- importShadow
- initClause
- nestingReduce
- paramTypeCombine
- ptrToRefParam
- typeUnparen
- unnecessaryBlock
wrapcheck:
ignorePackageGlobs:
2022-01-12 22:49:01 +03:00
- github.com/ossf/scorecard/v4/checks/fileparser