mirror of
https://github.com/ossf/scorecard.git
synced 2024-11-10 02:16:26 +03:00
271f0f2a27
* Fix linter timeout by renaming deprecated deadline. Signed-off-by: Spencer Schrock <sschrock@google.com> * Disable depguard linter. As of golangci-lint v3.5.0, the depguard linter is complaining. We don't use a .depguard.yml file, so just disabling the linter. Signed-off-by: Spencer Schrock <sschrock@google.com> * Move linter into own workflow. Signed-off-by: Spencer Schrock <sschrock@google.com> * Fix bash command substitution. Signed-off-by: Spencer Schrock <sschrock@google.com> * Add harden runner. Signed-off-by: Spencer Schrock <sschrock@google.com> * switch names to existing linter job Signed-off-by: Spencer Schrock <sschrock@google.com> * Update golangci-lint to v1.53.3 Signed-off-by: Spencer Schrock <sschrock@google.com> --------- Signed-off-by: Spencer Schrock <sschrock@google.com>
144 lines
2.7 KiB
YAML
144 lines
2.7 KiB
YAML
---
|
|
run:
|
|
concurrency: 6
|
|
timeout: 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: ""
|
|
exclude-rules:
|
|
- path: '(.+)_test\.go'
|
|
linters:
|
|
- funlen
|
|
- goconst
|
|
- gocyclo
|
|
skip-files:
|
|
- cron/data/request.pb.go # autogenerated
|
|
linters:
|
|
disable-all: true
|
|
enable:
|
|
- asciicheck
|
|
- dogsled
|
|
- errcheck
|
|
- errorlint
|
|
- exhaustive
|
|
- exportloopref
|
|
- gci
|
|
- gochecknoinits
|
|
- gocognit
|
|
- goconst
|
|
- gocritic
|
|
- gocyclo
|
|
- godot
|
|
- godox
|
|
- goerr113
|
|
- gofmt
|
|
- gofumpt
|
|
- goheader
|
|
- goimports
|
|
- gomodguard
|
|
- goprintffuncname
|
|
- gosec
|
|
- gosimple
|
|
- govet
|
|
- ineffassign
|
|
- 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
|
|
gci:
|
|
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:
|
|
- github.com/ossf/scorecard/v4/checks/fileparser
|