Skip to content

Bump golangci/golangci-lint-action from 6.5.2 to 8.0.0 #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ jobs:
check-latest: true
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v1.64
version: v2.1
191 changes: 79 additions & 112 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,11 @@
# SPDX-License-Identifier: Apache-2.0

---
version: "2"
run:
concurrency: 6
timeout: 5m
issues:
exclude-rules:
# counterfeiter fakes are usually named 'fake_<something>.go'
- path: fake_.*\.go
linters:
- gocritic
- golint
- dupl

# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0

# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0
linters:
disable-all: true
default: none
enable:
- asciicheck
- bodyclose
Expand All @@ -32,15 +18,11 @@ linters:
- gocritic
- gocyclo
- godox
- gofmt
- gofumpt
- goheader
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- importas
- ineffassign
Expand All @@ -53,99 +35,84 @@ linters:
- promlinter
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
# - cyclop
# - errorlint
# - exhaustive
# - exhaustivestruct
# - exportloopref
# - forbidigo
# - forcetypeassert
# - funlen
# - gci
# - gochecknoglobals
# - gochecknoinits
# - gocognit
# - godot
# - goerr113
# - gomnd
# - ifshort
# - lll
# - nestif
# - nilerr
# - nlreturn
# - noctx
# - paralleltest
# - scopelint
# - tagliatelle
# - testpackage
# - thelper
# - tparallel
# - wastedassign
# - wrapcheck
# - wsl
linters-settings:
godox:
keywords:
- BUG
- FIXME
- HACK
errcheck:
check-type-assertions: true
check-blank: true
gocritic:
enabled-checks:
# Diagnostic
- commentedOutCode
- nilValReturn
- sloppyReassign
- weakCond
- octalLiteral

# Performance
- appendCombine
- equalFold
- hugeParam
- indexAlloc
- rangeExprCopy
- rangeValCopy

# Style
- boolExprSimplify
- commentedOutImport
- docStub
- emptyFallthrough
- emptyStringTest
- hexLiteral
- methodExprCall
- stringXbytes
- typeAssertChain
- unlabelStmt
- yodaStyleExpr
# - ifElseChain

# Opinionated
- builtinShadow
- importShadow
- initClause
- nestingReduce
- paramTypeCombine
- ptrToRefParam
- typeUnparen
- unnamedResult
- unnecessaryBlock
nolintlint:
# Enable to ensure that nolint directives are all used. Default is true.
allow-unused: false
# Exclude following linters from requiring an explanation. Default is [].
allow-no-explanation: []
# Enable to require an explanation of nonzero length after each nolint directive. Default is false.
# TODO(lint): Enforce explanations for `nolint` directives
require-explanation: false
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
require-specific: true
settings:
errcheck:
check-type-assertions: true
check-blank: true
gocritic:
enabled-checks:
- commentedOutCode
- nilValReturn
- sloppyReassign
- weakCond
- octalLiteral
- appendCombine
- equalFold
- hugeParam
- indexAlloc
- rangeExprCopy
- rangeValCopy
- boolExprSimplify
- commentedOutImport
- docStub
- emptyFallthrough
- emptyStringTest
- hexLiteral
- methodExprCall
- stringXbytes
- typeAssertChain
- unlabelStmt
- yodaStyleExpr
- builtinShadow
- importShadow
- initClause
- nestingReduce
- paramTypeCombine
- ptrToRefParam
- typeUnparen
- unnamedResult
- unnecessaryBlock
godox:
keywords:
- BUG
- FIXME
- HACK
nolintlint:
require-explanation: false
require-specific: true
allow-unused: false
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
- gocritic
- golint
path: fake_.*\.go
paths:
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gofmt
- gofumpt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading