Skip to content

Commit c2d8c9e

Browse files
alexandearelminster-aom
authored andcommitted
chore: Enable nolintlint linter (google#3821)
1 parent a44d6ae commit c2d8c9e

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ linters:
2121
- modernize
2222
- musttag
2323
- nakedret
24+
- nolintlint
2425
- paralleltest
2526
- perfsprint
2627
- revive
@@ -88,6 +89,9 @@ linters:
8889
modernize:
8990
disable:
9091
- omitzero # TODO: fix
92+
nolintlint:
93+
allow-unused: true
94+
require-specific: true
9195
perfsprint:
9296
errorf: true
9397
strconcat: false

github/issue_import_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ func TestIssueImportService_CheckStatusSince(t *testing.T) {
224224
testMethod(t, r, "GET")
225225
testHeader(t, r, "Accept", mediaTypeIssueImportAPI)
226226
w.WriteHeader(http.StatusOK)
227-
//nolint:fmtpercentv
228227
assertWrite(t, w, fmt.Appendf(nil, "[%s]", issueImportResponseJSON))
229228
})
230229

github/migrations_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ func TestMigrationService_ListMigrations(t *testing.T) {
6565
testHeader(t, r, "Accept", mediaTypeMigrationsPreview)
6666

6767
w.WriteHeader(http.StatusOK)
68-
//nolint:fmtpercentv
6968
assertWrite(t, w, fmt.Appendf(nil, "[%s]", migrationJSON))
7069
})
7170

github/migrations_user_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ func TestMigrationService_ListUserMigrations(t *testing.T) {
6161
testHeader(t, r, "Accept", mediaTypeMigrationsPreview)
6262

6363
w.WriteHeader(http.StatusOK)
64-
//nolint:fmtpercentv
6564
assertWrite(t, w, fmt.Appendf(nil, "[%s]", userMigrationJSON))
6665
})
6766

tools/gen-release-notes/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func genRefLines(breaking, nonBreaking []string) (ref, refNon []string) {
207207

208208
func newChangesSinceRelease(priorRelease string) string {
209209
url := fmt.Sprintf("%v/compare/%v...master", baseWebURL, priorRelease)
210-
resp, err := http.Get(url) //nolint: gosec
210+
resp, err := http.Get(url) //nolint:gosec
211211
must(err)
212212
defer resp.Body.Close()
213213

tools/metadata/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ GET /undocumented/{undocumented_id}
6767
`, "")
6868
}
6969

70-
//nolint:tparallel,paralleltest // cannot use t.Parallel() when helper calls t.Setenv
70+
//nolint:paralleltest // cannot use t.Parallel() when helper calls t.Setenv
7171
func TestUpdateOpenAPI(t *testing.T) {
7272
testServer := newTestServer(t, "main", map[string]any{
7373
"api.github.com/api.github.com.json": openapi3.T{

0 commit comments

Comments
 (0)