summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-26 23:30:37 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-29 02:14:51 -0700
commitb0b7c75e9e2ee8c80a82a04562a1a7c7d117ae0e (patch)
tree3dbde7db70ecd7eb33fd79e710030d88c1714ad6
parent676d6be02292900c2ba47f5c1a95b42ab81a7b93 (diff)
.golangci.yml: Turn on 'gocritic', fix
-rw-r--r--.golangci.yml4
-rw-r--r--compat/json/borrowed_stream_test.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 765176c..6291572 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -51,7 +51,6 @@ linters:
- forcetypeassert
- gochecknoglobals
- gochecknoinits
- - gocritic
- godot
- gomnd
- ireturn
@@ -88,5 +87,8 @@ issues:
- errcheck
- gofumpt
- gosec
+ - path: "borrowed_.*_test\\.go"
+ linters: [gocritic]
+ text: "commentFormatting: put a space between `//` and comment text"
max-issues-per-linter: 0
max-same-issues: 0
diff --git a/compat/json/borrowed_stream_test.go b/compat/json/borrowed_stream_test.go
index 50478f0..80f6f03 100644
--- a/compat/json/borrowed_stream_test.go
+++ b/compat/json/borrowed_stream_test.go
@@ -9,7 +9,6 @@ package json
import (
"bytes"
"io"
- "log"
"net"
"net/http"
"net/http/httptest"
@@ -460,7 +459,7 @@ func TestHTTPDecoding(t *testing.T) {
defer ts.Close()
res, err := http.Get(ts.URL)
if err != nil {
- log.Fatalf("GET failed: %v", err)
+ t.Fatalf("GET failed: %v", err) // MODIFIED: changed from log.Fatalf to t.Fatalf
}
defer res.Body.Close()