|
|
|
@ -2,8 +2,6 @@ version: "2"
|
|
|
|
|
|
|
|
|
|
linters:
|
|
|
|
|
enable:
|
|
|
|
|
- errcheck
|
|
|
|
|
- goimports
|
|
|
|
|
- revive
|
|
|
|
|
- govet
|
|
|
|
|
- staticcheck
|
|
|
|
@ -16,10 +14,18 @@ linters:
|
|
|
|
|
- forbidigo
|
|
|
|
|
- mirror
|
|
|
|
|
- bodyclose
|
|
|
|
|
disable:
|
|
|
|
|
- errcheck
|
|
|
|
|
settings:
|
|
|
|
|
goimports:
|
|
|
|
|
# Put imports beginning with prefix after 3rd-party packages.
|
|
|
|
|
local-prefixes: github.com/usememos/memos
|
|
|
|
|
exhaustive:
|
|
|
|
|
explicit-exhaustive-switch: false
|
|
|
|
|
staticcheck:
|
|
|
|
|
checks:
|
|
|
|
|
- all
|
|
|
|
|
- -ST1000
|
|
|
|
|
- -ST1003
|
|
|
|
|
- -ST1021
|
|
|
|
|
- -QF1003
|
|
|
|
|
revive:
|
|
|
|
|
# Default to run all linters so that new rules in the future could automatically be added to the static check.
|
|
|
|
|
enable-all-rules: true
|
|
|
|
@ -67,6 +73,8 @@ linters:
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: redefines-builtin-id
|
|
|
|
|
disabled: true
|
|
|
|
|
- name: package-comments
|
|
|
|
|
disabled: true
|
|
|
|
|
gocritic:
|
|
|
|
|
disabled-checks:
|
|
|
|
|
- ifElseChain
|
|
|
|
@ -81,10 +89,18 @@ linters:
|
|
|
|
|
- shadow
|
|
|
|
|
forbidigo:
|
|
|
|
|
forbid:
|
|
|
|
|
- 'fmt\.Errorf(# Please use errors\.Wrap\|Wrapf\|Errorf instead)?'
|
|
|
|
|
- 'ioutil\.ReadDir(# Please use os\.ReadDir)?'
|
|
|
|
|
- pattern: 'fmt\.Errorf(# Please use errors\.Wrap\|Wrapf\|Errorf instead)?'
|
|
|
|
|
- pattern: 'ioutil\.ReadDir(# Please use os\.ReadDir)?'
|
|
|
|
|
|
|
|
|
|
issues:
|
|
|
|
|
exclude:
|
|
|
|
|
- Rollback
|
|
|
|
|
- fmt.Printf
|
|
|
|
|
|
|
|
|
|
formatters:
|
|
|
|
|
enable:
|
|
|
|
|
- goimports
|
|
|
|
|
settings:
|
|
|
|
|
goimports:
|
|
|
|
|
local-prefixes:
|
|
|
|
|
- github.com/usememos/memos
|
|
|
|
|