2021-02-15 19:01:30 +03:00
|
|
|
---
|
|
|
|
run:
|
|
|
|
concurrency: 6
|
2023-07-07 23:03:29 +03:00
|
|
|
timeout: 5m
|
2021-04-28 00:00:50 +03:00
|
|
|
issues:
|
2022-03-23 05:23:39 +03:00
|
|
|
# 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: ""
|
2023-04-10 22:18:27 +03:00
|
|
|
exclude-rules:
|
|
|
|
- path: '(.+)_test\.go'
|
|
|
|
linters:
|
|
|
|
- funlen
|
|
|
|
- goconst
|
|
|
|
- gocyclo
|
2023-12-04 05:14:01 +03:00
|
|
|
- goerr113
|
|
|
|
- lll
|
|
|
|
- wrapcheck
|
2021-05-24 06:51:52 +03:00
|
|
|
skip-files:
|
|
|
|
- cron/data/request.pb.go # autogenerated
|
2021-02-15 19:01:30 +03:00
|
|
|
linters:
|
|
|
|
enable:
|
|
|
|
- asciicheck
|
|
|
|
- dogsled
|
|
|
|
- errcheck
|
2023-10-24 02:10:04 +03:00
|
|
|
- errname
|
2021-05-30 07:21:43 +03:00
|
|
|
- errorlint
|
2021-02-15 19:01:30 +03:00
|
|
|
- exhaustive
|
|
|
|
- exportloopref
|
2023-10-23 23:12:50 +03:00
|
|
|
- forbidigo
|
2021-05-24 06:51:52 +03:00
|
|
|
- gci
|
2021-05-22 20:19:52 +03:00
|
|
|
- gochecknoinits
|
2021-02-15 19:01:30 +03:00
|
|
|
- gocognit
|
|
|
|
- goconst
|
2021-05-20 09:21:01 +03:00
|
|
|
- gocritic
|
2021-02-15 19:01:30 +03:00
|
|
|
- gocyclo
|
|
|
|
- godot
|
|
|
|
- godox
|
2021-05-22 22:36:47 +03:00
|
|
|
- goerr113
|
2021-02-15 19:01:30 +03:00
|
|
|
- gofmt
|
|
|
|
- gofumpt
|
|
|
|
- goheader
|
|
|
|
- goimports
|
2023-10-24 01:57:43 +03:00
|
|
|
# manage use of replace, retract and exclude directives (see https://github.com/ossf/scorecard/pull/3440#issuecomment-1708904830)
|
|
|
|
# https://golangci-lint.run/usage/linters/#gomoddirectives
|
|
|
|
- gomoddirectives
|
2021-02-15 19:01:30 +03:00
|
|
|
- gomodguard
|
|
|
|
- goprintffuncname
|
|
|
|
- gosec
|
|
|
|
- gosimple
|
2021-05-20 09:38:58 +03:00
|
|
|
- govet
|
2021-02-15 19:01:30 +03:00
|
|
|
- ineffassign
|
2021-05-22 20:29:18 +03:00
|
|
|
- lll
|
2021-05-24 21:19:37 +03:00
|
|
|
- makezero
|
2023-10-24 01:40:01 +03:00
|
|
|
- mirror
|
2021-02-15 19:01:30 +03:00
|
|
|
- misspell
|
|
|
|
- nakedret
|
|
|
|
- nestif
|
2023-11-15 22:44:28 +03:00
|
|
|
- nolintlint
|
2021-02-15 19:01:30 +03:00
|
|
|
- predeclared
|
|
|
|
- staticcheck
|
2021-05-22 20:45:32 +03:00
|
|
|
- stylecheck
|
2023-10-24 01:40:01 +03:00
|
|
|
- tenv
|
2021-02-15 19:01:30 +03:00
|
|
|
- thelper
|
|
|
|
- typecheck
|
|
|
|
- unconvert
|
|
|
|
- unused
|
2023-10-24 01:40:01 +03:00
|
|
|
- usestdlibvars
|
2021-02-15 19:01:30 +03:00
|
|
|
- whitespace
|
|
|
|
- wrapcheck
|
2023-10-28 01:05:40 +03:00
|
|
|
disable:
|
|
|
|
- exhaustruct # initializing every struct makes tests longer without much benefit (spencerschrock)
|
|
|
|
- paralleltest # need to investigate rate limit issues before re-enabling? (#2527)
|
|
|
|
- testpackage # tests don't need their own package (spencerschrock)
|
2023-10-23 19:35:40 +03:00
|
|
|
presets:
|
|
|
|
- bugs
|
2023-10-28 01:05:40 +03:00
|
|
|
- test
|
2021-02-15 19:01:30 +03:00
|
|
|
linters-settings:
|
|
|
|
errcheck:
|
|
|
|
check-type-assertions: true
|
|
|
|
check-blank: true
|
2022-07-13 20:50:51 +03:00
|
|
|
exhaustive:
|
|
|
|
# https://golangci-lint.run/usage/linters/#exhaustive
|
|
|
|
default-signifies-exhaustive: true
|
2023-10-23 23:12:50 +03:00
|
|
|
forbidigo:
|
|
|
|
forbid:
|
|
|
|
- p: "^fmt\\.Print.*$"
|
|
|
|
msg: "Do not commit print statements. Output to stdout interferes with users who redirect JSON results to files."
|
2021-02-28 05:55:36 +03:00
|
|
|
govet:
|
|
|
|
enable:
|
|
|
|
- fieldalignment
|
2021-02-15 19:01:30 +03:00
|
|
|
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)
|
2021-02-15 19:01:30 +03:00
|
|
|
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
|
2023-11-15 22:44:28 +03:00
|
|
|
nolintlint:
|
|
|
|
# `//nolint` should mention specific linter such as `//nolint:my-linter`
|
|
|
|
# Overly broad directives can hide unrelated issues
|
|
|
|
require-specific: true
|
2021-11-08 21:57:03 +03:00
|
|
|
wrapcheck:
|
|
|
|
ignorePackageGlobs:
|
2022-01-12 22:49:01 +03:00
|
|
|
- github.com/ossf/scorecard/v4/checks/fileparser
|