Skip to content

Commit f49f670

Browse files
kakkoyundarccio
andauthored
chore(ci): add nofilter for reviewdog (#4418)
Co-authored-by: dario.castane <dario.castane@datadoghq.com>
1 parent ab547c3 commit f49f670

File tree

13 files changed

+30
-16
lines changed

13 files changed

+30
-16
lines changed

.github/workflows/static-checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ jobs:
154154
golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }}
155155
fail_level: error
156156
reporter: github-pr-review
157+
filter_mode: nofilter
157158

158159
- name: golangci-lint (internal/orchestrion/_integration)
159160
uses: reviewdog/action-golangci-lint@f9bba13753278f6a73b27a56a3ffb1bfda90ed71 # v2.8.0
@@ -164,6 +165,7 @@ jobs:
164165
fail_level: error
165166
reporter: github-pr-review
166167
workdir: internal/orchestrion/_integration
168+
filter_mode: nofilter
167169

168170
- name: shellcheck
169171
uses: reviewdog/action-shellcheck@4c07458293ac342d477251099501a718ae5ef86e # v1.32.0

internal/orchestrion/_integration/chi.v5/chi.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func (tc *TestCase) Setup(_ context.Context, t *testing.T) {
4848
func (tc *TestCase) Run(_ context.Context, t *testing.T) {
4949
resp, err := http.Get(fmt.Sprintf("http://%s/", tc.Server.Addr))
5050
require.NoError(t, err)
51+
defer resp.Body.Close()
5152
require.Equal(t, http.StatusOK, resp.StatusCode)
5253
}
5354

internal/orchestrion/_integration/echo.v4/echo.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ func (tc *TestCase) Setup(_ context.Context, t *testing.T) {
4747
func (tc *TestCase) Run(_ context.Context, t *testing.T) {
4848
resp, err := http.Get("http://" + tc.addr + "/ping")
4949
require.NoError(t, err)
50+
defer resp.Body.Close()
5051
require.Equal(t, http.StatusOK, resp.StatusCode)
5152
}
5253

5354
func (tc *TestCase) ExpectedTraces() trace.Traces {
54-
httpUrl := "http://" + tc.addr + "/ping"
55+
httpURL := "http://" + tc.addr + "/ping"
5556
return trace.Traces{
5657
{
5758
// NB: 2 Top-level spans are from the HTTP Client/Server, which are library-side instrumented.
@@ -62,7 +63,7 @@ func (tc *TestCase) ExpectedTraces() trace.Traces {
6263
"type": "http",
6364
},
6465
Meta: map[string]string{
65-
"http.url": httpUrl,
66+
"http.url": httpURL,
6667
"component": "net/http",
6768
"span.kind": "client",
6869
},
@@ -75,7 +76,7 @@ func (tc *TestCase) ExpectedTraces() trace.Traces {
7576
"type": "web",
7677
},
7778
Meta: map[string]string{
78-
"http.url": httpUrl,
79+
"http.url": httpURL,
7980
"component": "net/http",
8081
"span.kind": "server",
8182
},
@@ -88,7 +89,7 @@ func (tc *TestCase) ExpectedTraces() trace.Traces {
8889
"type": "web",
8990
},
9091
Meta: map[string]string{
91-
"http.url": httpUrl,
92+
"http.url": httpURL,
9293
"component": "labstack/echo.v4",
9394
"span.kind": "server",
9495
},

internal/orchestrion/_integration/fiber.v2/fiber.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ func (tc *TestCase) Setup(_ context.Context, t *testing.T) {
3939
func (tc *TestCase) Run(_ context.Context, t *testing.T) {
4040
resp, err := http.Get("http://" + tc.addr + "/ping")
4141
require.NoError(t, err)
42+
defer resp.Body.Close()
4243
require.Equal(t, http.StatusOK, resp.StatusCode)
4344
}
4445

4546
func (tc *TestCase) ExpectedTraces() trace.Traces {
46-
httpUrl := "http://" + tc.addr + "/ping"
47+
httpURL := "http://" + tc.addr + "/ping"
4748
return trace.Traces{
4849
{
4950
// NB: Top-level span is from the HTTP Client, which is library-side instrumented.
@@ -55,7 +56,7 @@ func (tc *TestCase) ExpectedTraces() trace.Traces {
5556
"type": "http",
5657
},
5758
Meta: map[string]string{
58-
"http.url": httpUrl,
59+
"http.url": httpURL,
5960
"component": "net/http",
6061
"span.kind": "client",
6162
},

internal/orchestrion/_integration/gin/base.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ func (tc *TestCaseBase) Setup(_ context.Context, t *testing.T) {
4747
func (tc *TestCaseBase) Run(_ context.Context, t *testing.T) {
4848
resp, err := http.Get("http://" + tc.Server.Addr + "/ping")
4949
require.NoError(t, err)
50+
defer resp.Body.Close()
5051
require.Equal(t, http.StatusOK, resp.StatusCode)
5152
}
5253

5354
func (tc *TestCaseBase) ExpectedTraces() trace.Traces {
54-
httpUrl := "http://" + tc.Server.Addr + "/ping"
55+
httpURL := "http://" + tc.Server.Addr + "/ping"
5556
return trace.Traces{
5657
{
5758
// NB: 2 Top-level spans are from the HTTP Client/Server, which are library-side instrumented.
@@ -62,7 +63,7 @@ func (tc *TestCaseBase) ExpectedTraces() trace.Traces {
6263
"type": "http",
6364
},
6465
Meta: map[string]string{
65-
"http.url": httpUrl,
66+
"http.url": httpURL,
6667
"component": "net/http",
6768
"span.kind": "client",
6869
},
@@ -75,7 +76,7 @@ func (tc *TestCaseBase) ExpectedTraces() trace.Traces {
7576
"type": "web",
7677
},
7778
Meta: map[string]string{
78-
"http.url": httpUrl,
79+
"http.url": httpURL,
7980
"component": "net/http",
8081
"span.kind": "server",
8182
},
@@ -89,7 +90,7 @@ func (tc *TestCaseBase) ExpectedTraces() trace.Traces {
8990
"type": "web",
9091
},
9192
Meta: map[string]string{
92-
"http.url": httpUrl,
93+
"http.url": httpURL,
9394
"component": "gin-gonic/gin",
9495
"span.kind": "server",
9596
},

internal/orchestrion/_integration/gorilla_mux/gorilla_mux.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func (tc *TestCaseSubrouter) Setup(_ context.Context, t *testing.T) {
5252
func (tc *TestCaseSubrouter) Run(_ context.Context, t *testing.T) {
5353
resp, err := http.Get(fmt.Sprintf("http://%s/sub/ping", tc.Server.Addr))
5454
require.NoError(t, err)
55+
defer resp.Body.Close()
5556
require.Equal(t, http.StatusOK, resp.StatusCode)
5657
}
5758

@@ -180,6 +181,7 @@ func (tc *TestCase) Setup(_ context.Context, t *testing.T) {
180181
func (tc *TestCase) Run(_ context.Context, t *testing.T) {
181182
resp, err := http.Get(fmt.Sprintf("http://%s/ping", tc.Server.Addr))
182183
require.NoError(t, err)
184+
defer resp.Body.Close()
183185
require.Equal(t, http.StatusOK, resp.StatusCode)
184186
}
185187

internal/orchestrion/_integration/graphql-go/graphql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (tc *TestCase) Run(_ context.Context, t *testing.T) {
5353

5454
resp, err := http.DefaultClient.Do(req)
5555
require.NoError(t, err)
56-
defer req.Body.Close()
56+
defer resp.Body.Close()
5757

5858
body, err := io.ReadAll(resp.Body)
5959
require.NoError(t, err)

internal/orchestrion/_integration/julienschmidt_httprouter/julienschmidt_httprouter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func (tc *TestCase) Setup(_ context.Context, t *testing.T) {
5151
func (tc *TestCase) Run(_ context.Context, t *testing.T) {
5252
resp, err := http.Get(fmt.Sprintf("http://%s/ping", tc.Server.Addr))
5353
require.NoError(t, err)
54+
defer resp.Body.Close()
5455
require.Equal(t, http.StatusOK, resp.StatusCode)
5556
}
5657

internal/orchestrion/_integration/net_http/base.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func (b *base) Setup(_ context.Context, t *testing.T) {
4545
func (b *base) Run(_ context.Context, t *testing.T) {
4646
resp, err := http.Get(fmt.Sprintf("http://%s/", b.srv.Addr))
4747
require.NoError(t, err)
48+
defer resp.Body.Close()
4849
require.Equal(t, http.StatusOK, resp.StatusCode)
4950
}
5051

internal/orchestrion/_integration/net_http/client_error.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func (b *TestCaseClientError) Setup(_ context.Context, t *testing.T) {
4646
func (b *TestCaseClientError) Run(_ context.Context, t *testing.T) {
4747
resp, err := http.Get(fmt.Sprintf("http://%s/", b.srv.Addr))
4848
require.NoError(t, err)
49+
defer resp.Body.Close()
4950
require.Equal(t, http.StatusTeapot, resp.StatusCode)
5051
}
5152

0 commit comments

Comments
 (0)