Skip to content

chore: update linter to v2 #544

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

Merged
merged 1 commit into from
Jun 26, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
check-latest: true

- name: lint
uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v1.64.5
version: v2.1.6
49 changes: 32 additions & 17 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
version: "2"
run:
timeout: 5m
go: "1.24"

linters-settings:
lll:
line-length: 200
misspell:
locale: US

linters:
disable-all: true
default: none
enable:
- copyloopvar
- errcheck
- errorlint
- copyloopvar
- forcetypeassert
- gci
- gocritic
- goconst
- gocritic
- godot
- gofmt
- gofumpt
- goimports
- gosec
- gosimple
- govet
- ineffassign
- misspell
- revive
- staticcheck
- typecheck
- unconvert
- unused
- whitespace
settings:
lll:
line-length: 200
misspell:
locale: US
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: gitleaks
- repo: https://github.com/golangci/golangci-lint
rev: v1.62.0
rev: v2.1.6
hooks:
- id: golangci-lint
- repo: https://github.com/jumanjihouse/pre-commit-hooks
Expand Down
Loading