chore(ci): bump golangci-lint
This commit is contained in:
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 ./...
|
||||
+50
-34
@@ -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:
|
||||
- errcheck
|
||||
- gochecknoglobals
|
||||
- text: "weak cryptographic primitive"
|
||||
linters:
|
||||
- gosec
|
||||
- text: "weak random number generator"
|
||||
linters:
|
||||
- gosec
|
||||
- text: "integer overflow conversion"
|
||||
linters:
|
||||
- gosec
|
||||
- text: "at least one file in a package should have a package comment"
|
||||
linters:
|
||||
- stylecheck
|
||||
- text: "should rewrite switch"
|
||||
linters:
|
||||
- gocritic
|
||||
exclude-dirs:
|
||||
- server/assets
|
||||
exclude-dirs-use-default: true
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
rules:
|
||||
- linters:
|
||||
- errcheck
|
||||
- gochecknoglobals
|
||||
path: _test\.go
|
||||
- linters:
|
||||
- gosec
|
||||
text: weak cryptographic primitive
|
||||
- linters:
|
||||
- gosec
|
||||
text: weak random number generator
|
||||
- linters:
|
||||
- gosec
|
||||
text: integer overflow conversion
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: at least one file in a package should have a package comment
|
||||
- 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$
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -1,4 +1,4 @@
|
||||
//nolint:gochecknoglobals,golint,stylecheck
|
||||
//nolint:gochecknoglobals
|
||||
package gonic
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user