chore: explicit revive rules

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
pull/1778/head
Matthieu MOREL 2 months ago
parent c8110d7c08
commit d1977251f9

@ -1,21 +1,6 @@
issues: issues:
max-same-issues: 0 max-same-issues: 0
exclude-rules: exclude-rules: []
- linters:
- gosec
text: G115
- linters:
- revive
text: var-naming
- linters:
- revive
text: exported
- linters:
- revive
text: empty-block
- linters:
- revive
text: unused-parameter
linters: linters:
enable: enable:
- asciicheck - asciicheck
@ -58,6 +43,9 @@ linters-settings:
recommandations: recommandations:
- io - io
- os - os
gosec:
excludes:
- G115
perfsprint: perfsprint:
# Optimizes even if it requires an int or uint type cast. # Optimizes even if it requires an int or uint type cast.
int-conversion: true int-conversion: true
@ -69,5 +57,48 @@ linters-settings:
sprintf1: true sprintf1: true
# Optimizes into strings concatenation. # Optimizes into strings concatenation.
strconcat: true 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
disabled: true
- name: unreachable-code
- name: unused-parameter
disabled: true
- name: use-any
disabled: true
- name: var-declaration
- name: var-naming
disabled: true
testifylint: testifylint:
enable-all: true enable-all: true

@ -13,7 +13,7 @@ import (
"strconv" "strconv"
"strings" "strings"
cpu "github.com/shirou/gopsutil/v4/cpu" "github.com/shirou/gopsutil/v4/cpu"
"github.com/shirou/gopsutil/v4/internal/common" "github.com/shirou/gopsutil/v4/internal/common"
) )

Loading…
Cancel
Save