1
0
mirror of https://github.com/go-task/task.git synced 2025-04-02 22:15:30 +02:00

feat: migrate to golangci-lint v2

This commit is contained in:
Pete Davison 2025-03-26 22:55:38 +00:00
parent 60e28ecdcc
commit c5e9e67a4c
No known key found for this signature in database

View File

@ -1,38 +1,56 @@
# NOTE(@andreynering): The linters listed here are additions on top of
# those enabled by default:
#
# https://golangci-lint.run/usage/linters/#enabled-by-default
version: "2"
formatters:
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:
enable:
- depguard
- goimports
- gofmt
- gofumpt
- mirror
- misspell
- noctx
- paralleltest
- usetesting
- thelper
- tparallel
linters-settings:
depguard:
rules:
main:
files:
- "$all"
- "!$test"
- "!**/errors/*.go"
deny:
- pkg: "errors"
desc: "Use github.com/go-task/task/v3/errors instead"
goimports:
local-prefixes: github.com/go-task
gofumpt:
module-path: github.com/go-task/task/v3
gofmt:
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
- usetesting
settings:
depguard:
rules:
main:
files:
- $all
- '!$test'
- '!**/errors/*.go'
deny:
- pkg: errors
desc: Use github.com/go-task/task/v3/errors instead
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$