Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 11 additions & 32 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,38 +127,17 @@ linters:
exclude-godoc-examples: true
analyze-types: true
gocritic:
disable-all: true
# disabled-checks:
# - exitAfterDefer
# - assignOp
# - ifElseChain
# - elseif
enabled-checks:
- argOrder
- badCall
- badCond
- badLock
- badRegexp
- badSorting
- builtinShadow
- builtinShadowDecl
- caseOrder
- dupArg
- dupBranchBody
- dupCase
- dupSubExpr
- externalErrorReassign
- importShadow
- mapKey
- newDeref
- offBy1
- regexpPattern
- sloppyReassign
- truncateCmp
- uncheckedInlineErr
- weakCond
# performance lints
- indexAlloc
disabled-checks:
- assignOp
- appendAssign
- captLocal # We should probably enable this one
- commentFormatting # We should probably enable this one
- elseif
- exitAfterDefer
- ifElseChain
- sloppyLen
- underef
- unslice
nolintlint:
# Disable to ensure that all nolint directives actually have an effect.
# Default: false
Expand Down
4 changes: 2 additions & 2 deletions node/pkg/common/chain_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ func parseProtoFile() ([]ProtoEntry, error) {
// This traverses the parsed Go code looking for constant declarations
// that have the type "ChainID"
ast.Inspect(node, func(n ast.Node) bool {
switch x := n.(type) {
case *ast.GenDecl:
x, ok := n.(*ast.GenDecl)
if ok {
if x.Tok == token.CONST {
for _, spec := range x.Specs {
if vspec, ok := spec.(*ast.ValueSpec); ok {
Expand Down
Loading