You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gopsutil/.golangci.yml

127 lines
2.7 KiB
YAML

issues:
max-same-issues: 0
exclude-rules: []
linters:
enable:
- asciicheck
- contextcheck
- durationcheck
- errorlint
- gci
- gofmt
- gofumpt
- goimports
- gomodguard
- gosec
- gosimple
- importas
- misspell
- nakedret
- nolintlint
- perfsprint
- predeclared
- revive
- testifylint
- thelper
- typecheck
- unparam
- usetesting
disable:
- errcheck
- govet
- ineffassign
- staticcheck
- unused
linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/shirou)
gomodguard:
blocked:
modules:
- io/ioutil:
recommendations:
- io
- os
gosec:
excludes:
- G115
perfsprint:
# Optimizes even if it requires an int or uint type cast.
int-conversion: true
# Optimizes into `err.Error()` even if it is only equivalent for non-nil errors.
err-error: true
# Optimizes `fmt.Errorf`.
errorf: true
# Optimizes `fmt.Sprintf` with only one argument.
sprintf1: true
# Optimizes into strings concatenation.
strconcat: true
revive:
rules:
- name: blank-imports
- name: context-as-argument
arguments:
- allowTypesBefore: "*testing.T"
- name: context-keys-type
- name: dot-imports
- name: duplicated-imports
- name: early-return
arguments:
- "preserveScope"
- name: empty-block
disabled: true
- name: error-naming
- name: error-return
- name: error-strings
- name: exported
disabled: true
- name: errorf
- name: increment-decrement
- name: indent-error-flow
arguments:
- "preserveScope"
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: redundant-import-alias
- name: superfluous-else
arguments:
- "preserveScope"
- name: time-naming
- name: unexported-return
- name: unnecessary-stmt
- name: unreachable-code
- name: unused-parameter
disabled: true
- name: use-any
- name: var-declaration
- name: var-naming
disabled: true
testifylint:
enable-all: true
thelper:
test:
# Check t.Helper() begins helper function.
# Default: true
begin: false
benchmark:
# Check b.Helper() begins helper function.
# Default: true
begin: false
tb:
# Check tb.Helper() begins helper function.
# Default: true
begin: false
fuzz:
# Check f.Helper() begins helper function.
# Default: true
begin: false
usetesting:
os-create-temp: false
os-mkdir-temp: false
run:
timeout: 5m