Skip to content

Commit

Permalink
chore: explicit revive rules
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
  • Loading branch information
mmorel-35 committed Jan 18, 2025
1 parent c8110d7 commit d197725
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 17 deletions.
63 changes: 47 additions & 16 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
issues:
max-same-issues: 0
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
exclude-rules: []
linters:
enable:
- asciicheck
Expand Down Expand Up @@ -58,6 +43,9 @@ linters-settings:
recommandations:
- io
- os
gosec:
excludes:
- G115
perfsprint:
# Optimizes even if it requires an int or uint type cast.
int-conversion: true
Expand All @@ -69,5 +57,48 @@ linters-settings:
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
disabled: true
- name: unreachable-code
- name: unused-parameter
disabled: true
- name: use-any
disabled: true
- name: var-declaration
- name: var-naming
disabled: true
testifylint:
enable-all: true
2 changes: 1 addition & 1 deletion docker/docker_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strconv"
"strings"

cpu "github.com/shirou/gopsutil/v4/cpu"
"github.com/shirou/gopsutil/v4/cpu"
"github.com/shirou/gopsutil/v4/internal/common"
)

Expand Down

0 comments on commit d197725

Please sign in to comment.