Skip to content

Commit 8fc1da5

Browse files
committed
fix(lint): resolve last linter issues
Signed-off-by: Timo Sand <[email protected]>
1 parent d8c4021 commit 8fc1da5

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

GNUmakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ tf-provider-lint:
5353
tfproviderlintx \
5454
-AT001=false \
5555
-AT003=false \
56+
-AT004=false \
5657
-AT006=false \
5758
-XAT001=false \
5859
-XR003=false \
60+
-XR007=false \
5961
-XS002=false \
6062
$(TEST)
6163

github/resource_github_etag_unit_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func TestEtagDiffSuppressFunction(t *testing.T) {
1414

1515
if etagField == nil {
1616
t.Fatal("etag field not found in repository schema")
17-
panic("unreachable") // This resolves https://github.com/golangci/golangci-lint/issues/5979
17+
panic("unreachable") // lintignore:R009 // This resolves https://github.com/golangci/golangci-lint/issues/5979
1818
}
1919

2020
if etagField.DiffSuppressFunc == nil {

github/resource_github_user_invitation_accepter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
)
1111

1212
func resourceGithubUserInvitationAccepter() *schema.Resource {
13+
// lintignore:XR002
1314
return &schema.Resource{
1415
Description: "Accepts a repository invitation for the authenticated user.",
1516
Create: resourceGithubUserInvitationAccepterCreate,

github/transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ func (t *RetryTransport) RoundTrip(req *http.Request) (*http.Response, error) {
283283
return resp, err
284284
}
285285

286-
time.Sleep(t.retryDelay)
286+
time.Sleep(t.retryDelay) // lintignore:R018
287287
}
288288

289289
return resp, err

github/util_v4_repository_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ func TestGetRepositoryIDPositiveMatches(t *testing.T) {
117117
responses := template.Must(template.New("node_match").Parse(nodeMatchTmpl))
118118
_, err := responses.New("node_no_match").Parse(nodeNoMatchTmpl)
119119
if err != nil {
120-
panic(err)
120+
t.Fatal(err)
121121
}
122122
_, err = responses.New("repo_match").Parse(repoMatchTmpl)
123123
if err != nil {
124-
panic(err)
124+
t.Fatal(err)
125125
}
126126
_, err = responses.New("repo_no_match").Parse(repoNoMatchTmpl)
127127
if err != nil {
128-
panic(err)
128+
t.Fatal(err)
129129
}
130130

131131
mux := http.NewServeMux()
@@ -206,14 +206,14 @@ func (l localRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
206206
func mustRead(r io.Reader) string {
207207
b, err := io.ReadAll(r)
208208
if err != nil {
209-
panic(err)
209+
panic(err) // lintignore:R009
210210
}
211211
return string(b)
212212
}
213213

214214
func mustWrite(w io.Writer, s string) {
215215
_, err := io.WriteString(w, s)
216216
if err != nil {
217-
panic(err)
217+
panic(err) // lintignore:R009
218218
}
219219
}

0 commit comments

Comments
 (0)