scorecard/.golangci.yml
dependabot[bot] 66b3d8ce5c
🌱 Bump github.com/golangci/golangci-lint from 1.44.2 to 1.45.0 in /tools (#1757)
* 🌱 Bump github.com/golangci/golangci-lint in /tools

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.44.2 to 1.45.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.44.2...v1.45.0)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* golangci-lint: Surface and fix as many lint warnings automatically

Signed-off-by: Stephen Augustus <foo@auggie.dev>

* generated: Run golangci-lint with `fix: true`

Signed-off-by: Stephen Augustus <foo@auggie.dev>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Stephen Augustus <foo@auggie.dev>
2022-03-23 02:23:39 +00:00

169 lines
3.0 KiB
YAML

---
run:
concurrency: 6
deadline: 5m
issues:
include:
# revive `package-comments` and `exported` rules.
- EXC0012
- EXC0013
- EXC0014
- EXC0015
# 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: ""
# Fix found issues (if it's supported by the linter).
fix: true
skip-files:
- cron/data/request.pb.go # autogenerated
linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- 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
- noctx
- nolintlint
- paralleltest
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- wrapcheck
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
govet:
enable:
- fieldalignment
godox:
keywords:
- BUG
- FIXME
- HACK
gci:
sections:
- standard
- default
- prefix(github.com/ossf/scorecard)
gocritic:
enabled-checks:
# Diagnostic
- appendAssign
- argOrder
- badCond
- caseOrder
- codegenComment
- commentedOutCode
- deprecatedComment
- dupArg
- dupBranchBody
- dupCase
- dupSubExpr
- exitAfterDefer
- flagDeref
- flagName
- nilValReturn
- offBy1
- sloppyReassign
- weakCond
- octalLiteral
# Performance
- appendCombine
- equalFold
- hugeParam
- indexAlloc
- rangeExprCopy
- rangeValCopy
# Style
- assignOp
- boolExprSimplify
- captLocal
- commentFormatting
- commentedOutImport
- defaultCaseOrder
- docStub
- elseif
- emptyFallthrough
- emptyStringTest
- hexLiteral
- ifElseChain
- methodExprCall
- regexpMust
- singleCaseSwitch
- sloppyLen
- stringXbytes
- switchTrue
- typeAssertChain
- typeSwitchVar
- underef
- unlabelStmt
- unlambda
- unslice
- valSwap
- wrapperFunc
- yodaStyleExpr
# Opinionated
- builtinShadow
- importShadow
- initClause
- nestingReduce
- paramTypeCombine
- ptrToRefParam
- typeUnparen
- unnecessaryBlock
wrapcheck:
ignorePackageGlobs:
- github.com/ossf/scorecard/v4/checks/fileparser