Skip to content

Commit

Permalink
Fix fordbid for stellar/go/support/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jun 18, 2024
1 parent f6fad08 commit 842556b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ linters-settings:
# Default: ["^(fmt\\.Print(|f|ln)|print|println)$"]
forbid:
- p: "^(fmt\\.Print(|f|ln)|print|println)$"
msg: Do not commit debug print statements.
- p: .*
pkg: ^stellar/go/support/errors$
message: use standard errors package and fmt.Errorf().
msg: Do not commit debug print statements (in tests use t.Log()).
- p: "^.*$"
pkg: "^github.com/stellar/go/support/errors$"
msg: Do not use stellar/go/support/errors, use the standard 'errors' package and fmt.Errorf().
exclude-godoc-examples: false
analyze-types: true

linters:
enable-all: true
Expand All @@ -94,7 +95,7 @@ linters:
# exhaustruct: enforcing exhaustive fields is useful in some cases, but there are
# too many legitimate default field values in Go
- exhaustruct
# err113: Enforcing errors.Is() is useful but cannot be enabled in isoation
# err113: Enforcing errors.Is() is useful but cannot be enabled in isolation
- err113
- thelper
- wsl
Expand Down
1 change: 1 addition & 0 deletions cmd/soroban-rpc/internal/db/ledgerentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (l ledgerEntryWriter) UpsertLedgerEntry(entry xdr.LedgerEntry) error {
// because the key can be derived from the entry.
key, err := entry.LedgerKey()
if err != nil {
fmt.Printf("ojete")

Check failure on line 57 in cmd/soroban-rpc/internal/db/ledgerentry.go

View workflow job for this annotation

GitHub Actions / golangci-lint

use of `fmt.Printf` forbidden because "Do not commit debug print statements (in tests use t.Log())." (forbidigo)
return errors.Wrap(err, "could not get ledger key from entry")
}

Expand Down

0 comments on commit 842556b

Please sign in to comment.