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