Skip to content

Commit

Permalink
Merge pull request #853 from iotaledger/chore/fix-linter-issues
Browse files Browse the repository at this point in the history
Adapt .golangci.yml to latest version
  • Loading branch information
muXxer authored Mar 20, 2024
2 parents c6b06db + 3aa8d7e commit a3f787a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
run:
tests: true
skip-dirs:
- components/dashboard
skip-files:
- ".*_test.go$"
- "testframework.go"

linters-settings:
gofmt:
Expand All @@ -14,7 +9,8 @@ linters-settings:
gocyclo:
min-complexity: 15
govet:
check-shadowing: false
disable:
- shadow
misspell:
locale: US
staticcheck:
Expand Down Expand Up @@ -56,7 +52,7 @@ linters:
- bidichk
- bodyclose
#- containedctx
- contextcheck
#- contextcheck # this linter is buggy and renders all nolint rules useless
- decorder
- depguard
- dogsled
Expand Down Expand Up @@ -115,6 +111,12 @@ linters:
#- varnamelen

issues:
exclude-dirs:
- components/dashboard
exclude-files:
- ".*_test.go$"
- "testframework.go"
- ".*.pb.go$"
# Maximum issues count per one linter.
# Set to 0 to disable.
# Default: 50
Expand Down
2 changes: 1 addition & 1 deletion pkg/testsuite/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (t *TestSuite) AssertTransaction(transaction *iotago.Transaction, node *moc
return ierrors.Errorf("AssertTransaction: %s: expected ID %s, got %s", node.Name, transactionID, loadedTransactionMetadata.ID())
}

// nolint: forcetypeassert // we are in a test and want to assert it anyway
//nolint:forcetypeassert // we are in a test and want to assert it anyway
if !assert.Equal(t.fakeTesting, transaction.TransactionEssence, loadedTransactionMetadata.Transaction().(*iotago.Transaction).TransactionEssence) {
return ierrors.Errorf("AssertTransaction: %s: expected TransactionEssence %v, got %v", node.Name, transaction.TransactionEssence, loadedTransactionMetadata.Transaction().(*iotago.Transaction).TransactionEssence)
}
Expand Down

0 comments on commit a3f787a

Please sign in to comment.