chore(ci): bump golangci-lint

This commit is contained in:
sentriz
2025-07-30 12:48:04 +01:00
parent c2e5eb3f0f
commit fa434cc176
7 changed files with 63 additions and 47 deletions

No files matched your search

+3 -3
View File
@@ -33,10 +33,10 @@ jobs:
sudo apt update -qq
sudo apt install -y -qq build-essential git sqlite3 libtag1-dev ffmpeg mpv zlib1g-dev
- name: Lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
version: v1.60
args: --timeout=5m
install-mode: goinstall
version: v2.3.0
- name: Test
run: go test ./...
build-release:
+3 -3
View File
@@ -19,10 +19,10 @@ jobs:
sudo apt update -qq
sudo apt install -y -qq build-essential git sqlite3 libtag1-dev ffmpeg mpv zlib1g-dev
- name: Lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
version: v1.60
args: --timeout=5m
install-mode: goinstall
version: v2.3.0
- name: Test
run: go test ./...
release-please:
+3 -3
View File
@@ -20,9 +20,9 @@ jobs:
sudo apt update -qq
sudo apt install -y -qq build-essential git sqlite3 libtag1-dev ffmpeg mpv zlib1g-dev
- name: Lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
version: v1.60
args: --timeout=5m
install-mode: goinstall
version: v2.3.0
- name: Test
run: go test ./...
+43 -27
View File
@@ -1,5 +1,6 @@
version: "2"
linters:
disable-all: true
default: none
enable:
- asasalint
- asciicheck
@@ -14,8 +15,6 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
- exportloopref
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
@@ -24,13 +23,10 @@ linters:
- goconst
- gocritic
- gocyclo
- gofmt
- goheader
- goimports
- gomodguard
- goprintffuncname
- gosec
- gosimple
- gosmopolitan
- govet
- grouper
@@ -51,40 +47,60 @@ linters:
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- tenv
- testableexamples
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- wastedassign
- whitespace
- zerologlint
issues:
exclude-rules:
- path: _test\.go
linters:
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- errcheck
- gochecknoglobals
- text: "weak cryptographic primitive"
linters:
path: _test\.go
- linters:
- gosec
- text: "weak random number generator"
linters:
text: weak cryptographic primitive
- linters:
- gosec
- text: "integer overflow conversion"
linters:
text: weak random number generator
- linters:
- gosec
- text: "at least one file in a package should have a package comment"
linters:
- stylecheck
- text: "should rewrite switch"
linters:
text: integer overflow conversion
- linters:
- staticcheck
text: at least one file in a package should have a package comment
- linters:
- gocritic
exclude-dirs:
text: should rewrite switch
paths:
- server/assets
exclude-dirs-use-default: true
- third_party$
- builtin$
- examples$
settings:
staticcheck:
checks:
- all
- "-QF1001"
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- server/assets
- third_party$
- builtin$
- examples$
+1 -1
View File
@@ -2,7 +2,7 @@ package db
import "time"
type __OldPlaylist struct { //nolint: revive,stylecheck
type __OldPlaylist struct { //nolint: staticcheck
ID int `gorm:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
+2 -2
View File
@@ -39,8 +39,8 @@ const (
)
const (
audioPath5s = "testdata/audio/5s.flac" //nolint:deadcode,varcheck
audioPath10s = "testdata/audio/10s.flac" //nolint:deadcode,varcheck
audioPath5s = "testdata/audio/5s.flac"
audioPath10s = "testdata/audio/10s.flac"
)
type queryCase struct {
+1 -1
View File
@@ -1,4 +1,4 @@
//nolint:gochecknoglobals,golint,stylecheck
//nolint:gochecknoglobals
package gonic
import (