refactor: remove gotest.tools (#688)
* refactor: remove `gotest.tools` * remove all references to `gotest.tools` and replace it with `github.com/stretchr/testify` which was originally used for tests * bump `golangci-lint` version * add `depguard` and `importas` to prevent import of unwanted packages * add custom schema and information about config since schemastore.org has broken schema for `golangci-lint` config * fix: handle more error cases
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
# yaml-language-server: $schema=https://schemastore.pages.dev/schemas/json/golangci-lint.json
|
||||
# Your editor might complain about invalid types, but this is correct config
|
||||
# above schema should prevent editor from "shouting" about this
|
||||
# Minimum golangci-lint version required: v1.40.0
|
||||
run:
|
||||
timeout: 3m
|
||||
|
||||
@@ -8,6 +12,21 @@ linters-settings:
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
- ifElseChain
|
||||
importas:
|
||||
aliases:
|
||||
- pkg: 'github.com/sirupsen/logrus'
|
||||
alias: log
|
||||
- pkg: 'github.com/stretchr/testify/assert'
|
||||
alias: assert
|
||||
depguard:
|
||||
list-type: blacklist
|
||||
include-go-root: true
|
||||
packages:
|
||||
- gotest.tools/v3/assert
|
||||
- log
|
||||
packages-with-error-message:
|
||||
- gotest.tools/v3: 'Please keep tests unified using only github.com/stretchr/testify'
|
||||
- log: 'Please keep logging unified using only github.com/sirupsen/logrus'
|
||||
|
||||
linters:
|
||||
enable:
|
||||
@@ -25,3 +44,5 @@ linters:
|
||||
- goimports
|
||||
- whitespace
|
||||
- misspell
|
||||
- depguard
|
||||
- importas
|
||||
|
||||
Reference in New Issue
Block a user