Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
176 changes: 86 additions & 90 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
---
version: "2"
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
# Exclude previously existing issues from the report
new: true
new-from-rev: HEAD
linters:
disable-all: true
default: none
enable:
- asciicheck
- bodyclose
Expand All @@ -25,104 +12,113 @@ linters:
- errcheck
- errorlint
- exhaustive
- 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
- staticcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- whitespace
- wrapcheck
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
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/package-analysis)
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

settings:
errcheck:
check-type-assertions: true
check-blank: true
exhaustive:
default-signifies-exhaustive: true
gocritic:
enabled-checks:
- appendAssign
- badCond
- caseOrder
- codegenComment
- commentedOutCode
- deprecatedComment
- dupBranchBody
- dupCase
- dupSubExpr
- exitAfterDefer
- flagName
- nilValReturn
- weakCond
- octalLiteral
- appendCombine
- rangeExprCopy
- rangeValCopy
- boolExprSimplify
- captLocal
- commentFormatting
- commentedOutImport
- defaultCaseOrder
- docStub
- elseif
- emptyFallthrough
- hexLiteral
- ifElseChain
- methodExprCall
- singleCaseSwitch
- typeAssertChain
- typeSwitchVar
- underef
- unlabelStmt
- unlambda
godox:
keywords:
- BUG
- FIXME
- HACK
govet:
enable:
- fieldalignment
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
new-from-rev: HEAD
new: true
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/ossf/package-analysis)
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading