Skip to content

Commit

Permalink
Update linter config
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Byrgazov <[email protected]>
  • Loading branch information
Vladislav Byrgazov committed Nov 15, 2024
1 parent d331053 commit b3494a7
Showing 1 changed file with 26 additions and 34 deletions.
60 changes: 26 additions & 34 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@ linters-settings:
- (github.com/sirupsen/logrus.FieldLogger).Warnf
- (github.com/sirupsen/logrus.FieldLogger).Errorf
- (github.com/sirupsen/logrus.FieldLogger).Fatalf
revive:
confidence: 0.8
rules:
- name: exported
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: increment-decrement
- name: var-naming
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: superfluous-else
- name: unreachable-code
goimports:
local-prefixes: github.com/networkservicemesh
gocyclo:
Expand Down Expand Up @@ -60,75 +83,45 @@ linters-settings:
- G306 # Fixable
gocritic:
enabled-checks:
- appendAssign
- assignOp
- appendCombine
- argOrder
- badCall
- badCond
- boolExprSimplify
- builtinShadow
- captLocal
- caseOrder
- codegenComment
- commentFormatting
- commentedOutCode
- commentedOutImport
- defaultCaseOrder
- deprecatedComment
- docStub
- dupArg
- dupBranchBody
- dupCase
- dupImport
- dupSubExpr
- elseif
- emptyFallthrough
- emptyStringTest
- equalFold
- evalOrder
- exitAfterDefer
- flagDeref
- flagName
- hexLiteral
- hugeParam
- ifElseChain
- importShadow
- indexAlloc
- initClause
- methodExprCall
- nestingReduce
- newDeref
- nilValReturn
- octalLiteral
- offBy1
- paramTypeCombine
- rangeExprCopy
- rangeValCopy
- regexpMust
- regexpPattern
- singleCaseSwitch
- sloppyLen
- sloppyReassign
- stringXbytes
- switchTrue
- typeAssertChain
- typeSwitchVar
- typeUnparen
- unlabelStmt
- unnamedResult
- unnecessaryBlock
- underef
- unlambda
- unslice
- valSwap
- weakCond
- wrapperFunc
- yodaStyleExpr
linters:
disable-all: true
enable:
- goheader
- bodyclose
- unused
- depguard
- dogsled
- dupl
Expand All @@ -147,14 +140,13 @@ linters:
- ineffassign
- misspell
- nakedret
- copyloopvar
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- whitespace
- unused
- copyloopvar
issues:
exclude-use-default: false
max-issues-per-linter: 0
Expand Down

0 comments on commit b3494a7

Please sign in to comment.