From 8aafbc5009b335f769f6a69c6bdfc39476d8c712 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Wed, 26 Mar 2025 00:16:48 +0200 Subject: [PATCH 1/2] docs: replace golint with staticcheck in nolint example --- docs/src/docs/usage/false-positives.mdx | 2 +- pkg/result/processors/nolint_filter_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/docs/usage/false-positives.mdx b/docs/src/docs/usage/false-positives.mdx index 3a489d7560ab..d798cd39250a 100644 --- a/docs/src/docs/usage/false-positives.mdx +++ b/docs/src/docs/usage/false-positives.mdx @@ -122,7 +122,7 @@ var bad_name int //nolint:all To exclude issues from specific linters only: ```go -var bad_name int //nolint:golint,unused +var bad_name int //nolint:staticcheck,unused ``` To exclude issues for the block of code use this directive on the beginning of a line: diff --git a/pkg/result/processors/nolint_filter_test.go b/pkg/result/processors/nolint_filter_test.go index 852602a86ad2..34d6bd011a87 100644 --- a/pkg/result/processors/nolint_filter_test.go +++ b/pkg/result/processors/nolint_filter_test.go @@ -63,7 +63,7 @@ func TestTestNolintFilter_Process(t *testing.T) { processAssertEmpty(t, p, newNolintFileIssue(6, "any")) processAssertEmpty(t, p, newNolintFileIssue(7, "any")) - processAssertSame(t, p, newNolintFileIssue(1, "golint")) // no directive + processAssertSame(t, p, newNolintFileIssue(1, "staticcheck")) // no directive // test preceding comments processAssertEmpty(t, p, newNolintFileIssue(10, "any")) // preceding comment for var From 0535c5c3d0ac6fdabe46737361bf5070f5e02cc3 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 25 Mar 2025 23:23:00 +0100 Subject: [PATCH 2/2] review --- docs/src/docs/usage/false-positives.mdx | 2 +- pkg/result/processors/nolint_filter_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/docs/usage/false-positives.mdx b/docs/src/docs/usage/false-positives.mdx index d798cd39250a..bf542a9a406f 100644 --- a/docs/src/docs/usage/false-positives.mdx +++ b/docs/src/docs/usage/false-positives.mdx @@ -122,7 +122,7 @@ var bad_name int //nolint:all To exclude issues from specific linters only: ```go -var bad_name int //nolint:staticcheck,unused +var bad_name int //nolint:wsl,unused ``` To exclude issues for the block of code use this directive on the beginning of a line: diff --git a/pkg/result/processors/nolint_filter_test.go b/pkg/result/processors/nolint_filter_test.go index 34d6bd011a87..79dc6c1ce4bb 100644 --- a/pkg/result/processors/nolint_filter_test.go +++ b/pkg/result/processors/nolint_filter_test.go @@ -63,7 +63,7 @@ func TestTestNolintFilter_Process(t *testing.T) { processAssertEmpty(t, p, newNolintFileIssue(6, "any")) processAssertEmpty(t, p, newNolintFileIssue(7, "any")) - processAssertSame(t, p, newNolintFileIssue(1, "staticcheck")) // no directive + processAssertSame(t, p, newNolintFileIssue(1, "wsl")) // no directive // test preceding comments processAssertEmpty(t, p, newNolintFileIssue(10, "any")) // preceding comment for var