Skip to content

Commit 9d2fdae

Browse files
committed
Add errcheck excludes for fomatter
1 parent 3eb61e6 commit 9d2fdae

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.golangci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ linters:
1919
issues:
2020
exclude-use-default: false
2121

22-
linter-settings:
22+
linters-settings:
2323
goimports:
2424
local-prefixes: github.com/bluekeyes/go-gitdiff
25+
errcheck:
26+
exclude-functions:
27+
- (*github.com/bluekeyes/go-gitdiff/gitdiff.formatter).Write
28+
- (*github.com/bluekeyes/go-gitdiff/gitdiff.formatter).WriteString
29+
- (*github.com/bluekeyes/go-gitdiff/gitdiff.formatter).WriteByte
30+
- fmt.Fprintf(*github.com/bluekeyes/go-gitdiff/gitdiff.formatter)

gitdiff/base85_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ func FuzzBase85Roundtrip(f *testing.F) {
108108
out := make([]byte, n)
109109

110110
base85Encode(dst, in)
111-
base85Decode(out, dst)
112-
111+
if err := base85Decode(out, dst); err != nil {
112+
t.Fatalf("unexpected error decoding base85 data: %v", err)
113+
}
113114
if !bytes.Equal(in, out) {
114115
t.Errorf("decoded data differed from input data:\n input: %x\n output: %x\nencoding: %s\n", in, out, string(dst))
115116
}

0 commit comments

Comments
 (0)