mirror of
https://github.com/go-task/task.git
synced 2025-04-23 12:18:57 +02:00
feat: migrate to golangci-lint v2
This commit is contained in:
parent
60e28ecdcc
commit
c5e9e67a4c
@ -1,38 +1,56 @@
|
|||||||
# NOTE(@andreynering): The linters listed here are additions on top of
|
version: "2"
|
||||||
# those enabled by default:
|
|
||||||
#
|
formatters:
|
||||||
# https://golangci-lint.run/usage/linters/#enabled-by-default
|
enable:
|
||||||
|
- gofmt
|
||||||
|
- gofumpt
|
||||||
|
- goimports
|
||||||
|
settings:
|
||||||
|
gofmt:
|
||||||
|
rewrite-rules:
|
||||||
|
- pattern: interface{}
|
||||||
|
replacement: any
|
||||||
|
gofumpt:
|
||||||
|
module-path: github.com/go-task/task/v3
|
||||||
|
goimports:
|
||||||
|
local-prefixes:
|
||||||
|
- github.com/go-task
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- depguard
|
- depguard
|
||||||
- goimports
|
|
||||||
- gofmt
|
|
||||||
- gofumpt
|
|
||||||
- mirror
|
- mirror
|
||||||
- misspell
|
- misspell
|
||||||
- noctx
|
- noctx
|
||||||
- paralleltest
|
- paralleltest
|
||||||
- usetesting
|
|
||||||
- thelper
|
- thelper
|
||||||
- tparallel
|
- tparallel
|
||||||
|
- usetesting
|
||||||
linters-settings:
|
settings:
|
||||||
depguard:
|
depguard:
|
||||||
rules:
|
rules:
|
||||||
main:
|
main:
|
||||||
files:
|
files:
|
||||||
- "$all"
|
- $all
|
||||||
- "!$test"
|
- '!$test'
|
||||||
- "!**/errors/*.go"
|
- '!**/errors/*.go'
|
||||||
deny:
|
deny:
|
||||||
- pkg: "errors"
|
- pkg: errors
|
||||||
desc: "Use github.com/go-task/task/v3/errors instead"
|
desc: Use github.com/go-task/task/v3/errors instead
|
||||||
goimports:
|
exclusions:
|
||||||
local-prefixes: github.com/go-task
|
generated: lax
|
||||||
gofumpt:
|
presets:
|
||||||
module-path: github.com/go-task/task/v3
|
- comments
|
||||||
gofmt:
|
- common-false-positives
|
||||||
rewrite-rules:
|
- legacy
|
||||||
- pattern: 'interface{}'
|
- std-error-handling
|
||||||
replacement: 'any'
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
Loading…
x
Reference in New Issue
Block a user