Skip to content

Commit

Permalink
fix: the golangci-lint configuration and bump golangci-lint versi…
Browse files Browse the repository at this point in the history
…on (#219)
  • Loading branch information
Stefan-Ethernal authored Feb 18, 2025
1 parent 509353b commit 22da105
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 1.22.x

- name: Checkout code
uses: actions/checkout@v4

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v6.5.0
with:
version: v1.61
version: v1.64.5
args: --timeout=30m
8 changes: 1 addition & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@
run:
timeout: 3m
tests: true
skip-dirs-use-default: true

service:
golangci-lint-version: 1.61.0

linters:
disable-all: true
enable:
- whitespace # Tool for detection of leading and trailing whitespace
# - wsl # Forces you to use empty lines
- wastedassign # Finds wasted assignment statements
- unconvert # Unnecessary type conversions
- tparallel # Detects inappropriate usage of t.Parallel() method in your Go test codes
Expand All @@ -21,7 +16,6 @@ linters:
- prealloc # Finds slice declarations that could potentially be pre-allocated
- predeclared # Finds code that shadows one of Go's predeclared identifiers
- nolintlint # Ill-formed or insufficient nolint directives
# - nlreturn # Checks for a new line before return and branch statements to increase code clarity
- misspell # Misspelled English words in comments
- makezero # Finds slice declarations with non-zero initial length
- lll # Long lines
Expand All @@ -40,7 +34,7 @@ linters:
# - godox # Linter for TODOs and FIXMEs left in the code
- gci # Gci checks the consistency of the code with the Go code style guide
- mnd # mnd is a linter for magic numbers
# - revive
# - revive
- unparam # Unused function parameters

linters-settings:
Expand Down

0 comments on commit 22da105

Please sign in to comment.