Skip to content

Commit 11a110f

Browse files
authored
Merge pull request #264 from hashicorp/dependabot/github_actions/actions-b5bd5a21f8
[chore] : Bump golangci/golangci-lint-action from 6.5.2 to 8.0.0 in the actions group
2 parents 278e841 + a097294 commit 11a110f

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

.github/workflows/pr-unit-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
go-version: ${{matrix.go-version}}
2020

2121
- name: Run golangci-lint
22-
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84
22+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9
2323

2424
- name: Run unit tests and generate coverage report
2525
run: make test

.golangci.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1-
# Copyright (c) HashiCorp, Inc.
2-
# SPDX-License-Identifier: MPL-2.0
3-
1+
version: "2"
42
linters:
5-
disable-all: true
3+
default: none
64
enable:
75
- errcheck
8-
- staticcheck
9-
- gosimple
106
- govet
7+
- staticcheck
8+
exclusions:
9+
generated: lax
10+
presets:
11+
- comments
12+
- common-false-positives
13+
- legacy
14+
- std-error-handling
15+
paths:
16+
- third_party$
17+
- builtin$
18+
- examples$
19+
formatters:
20+
exclusions:
21+
generated: lax
22+
paths:
23+
- third_party$
24+
- builtin$
25+
- examples$

client_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ func TestClient_Do_WithPrepareRetry(t *testing.T) {
468468
if prepareChecks != tt.expectedPrepareChecks {
469469
t.Fatalf("expected %d attempts of prepare check, got %d attempts", tt.expectedPrepareChecks, prepareChecks)
470470
}
471-
header := req.Request.Header.Get("foo")
471+
header := req.Header.Get("foo")
472472
if tt.expectedPrepareChecks == 0 && header != "" {
473473
t.Fatalf("expected no changes to request header 'foo', but got '%s'", header)
474474
}
@@ -746,7 +746,7 @@ func TestClient_RequestWithContext(t *testing.T) {
746746
if err != nil {
747747
t.Fatalf("err: %v", err)
748748
}
749-
ctx, cancel := context.WithCancel(req.Request.Context())
749+
ctx, cancel := context.WithCancel(req.Context())
750750
reqCtx := req.WithContext(ctx)
751751
if reqCtx == req {
752752
t.Fatal("WithContext must return a new Request object")
@@ -757,7 +757,7 @@ func TestClient_RequestWithContext(t *testing.T) {
757757
called := 0
758758
client.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) {
759759
called++
760-
return DefaultRetryPolicy(reqCtx.Request.Context(), resp, err)
760+
return DefaultRetryPolicy(reqCtx.Context(), resp, err)
761761
}
762762

763763
cancel()

0 commit comments

Comments
 (0)