aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2026-01-02 15:15:21 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-01-02 15:27:58 +0000
commit5cdbe12ef7ec1ee2d99c5430924aab23c0fea503 (patch)
tree58f2b79f952a7feaa507eb015eab4a1eb253ab70 /pkg
parenta10c0112aec1525f7ca5f74716fc5f0552e2d05e (diff)
all: remove unused nolint directives
Diffstat (limited to 'pkg')
-rw-r--r--pkg/build/fuchsia.go1
-rw-r--r--pkg/cover/cover_test.go4
-rw-r--r--pkg/csource/options_test.go2
-rw-r--r--pkg/ifuzz/x86/gen/gen.go2
-rw-r--r--pkg/report/freebsd.go1
-rw-r--r--pkg/report/linux.go2
-rw-r--r--pkg/stat/sample/pvalue.go2
-rw-r--r--pkg/updater/updater.go1
-rw-r--r--pkg/validator/validator_test.go2
-rw-r--r--pkg/vcs/vcs.go2
-rw-r--r--pkg/vcs/vcs_test.go2
11 files changed, 6 insertions, 15 deletions
diff --git a/pkg/build/fuchsia.go b/pkg/build/fuchsia.go
index c33bfab12..180db93b3 100644
--- a/pkg/build/fuchsia.go
+++ b/pkg/build/fuchsia.go
@@ -27,7 +27,6 @@ func syzRoot() (string, error) {
return filepath.Abs(filepath.Join(filepath.Dir(selfPath), "../.."))
}
-// nolint: goconst // to ignore "out/"
func (fu fuchsia) build(params Params) (ImageDetails, error) {
syzDir, err := syzRoot()
if err != nil {
diff --git a/pkg/cover/cover_test.go b/pkg/cover/cover_test.go
index 169dbf08c..1d179ebd3 100644
--- a/pkg/cover/cover_test.go
+++ b/pkg/cover/cover_test.go
@@ -67,7 +67,7 @@ func TestMergeDiff(t *testing.T) {
func TestPerLineCoverage(t *testing.T) {
const End = backend.LineEnd
// Start line:col - end line:col.
- // nolint
+ // nolint: govet
covered := []backend.Range{
// Just covered.
{1, 2, 1, 10},
@@ -88,7 +88,7 @@ func TestPerLineCoverage(t *testing.T) {
{42, 20, 42, 30},
{42, 10, 42, 25},
}
- // nolint
+ // nolint:govet
uncovered := []backend.Range{
{10, 20, 10, 30},
{11, 0, 11, 20},
diff --git a/pkg/csource/options_test.go b/pkg/csource/options_test.go
index f7812e6b9..5fdd59c8c 100644
--- a/pkg/csource/options_test.go
+++ b/pkg/csource/options_test.go
@@ -28,7 +28,7 @@ func TestParseOptions(t *testing.T) {
func TestParseOptionsCanned(t *testing.T) {
// Dashboard stores csource options with syzkaller reproducers,
// so we need to be able to parse old formats.
- // nolint: lll, dupl
+ // nolint: lll
canned := map[string]Options{
`{"threaded":true,"collide":true,"repeat":true,"procs":10,"sandbox":"namespace",
"fault":true,"fault_call":1,"fault_nth":2,"tun":true,"tmpdir":true,"cgroups":true,
diff --git a/pkg/ifuzz/x86/gen/gen.go b/pkg/ifuzz/x86/gen/gen.go
index b79b8dabf..bcbcf72ad 100644
--- a/pkg/ifuzz/x86/gen/gen.go
+++ b/pkg/ifuzz/x86/gen/gen.go
@@ -200,7 +200,7 @@ func (err errSkip) Error() string {
return string(err)
}
-// nolint: gocyclo, gocognit, funlen
+// nolint: gocyclo, funlen
func parsePattern(insn *x86.Insn, vals []string) error {
if insn.Opcode != nil {
return fmt.Errorf("PATTERN is already parsed for the instruction")
diff --git a/pkg/report/freebsd.go b/pkg/report/freebsd.go
index 37c50eaf8..acb1aac88 100644
--- a/pkg/report/freebsd.go
+++ b/pkg/report/freebsd.go
@@ -32,7 +32,6 @@ func (ctx *freebsd) Symbolize(rep *Report) error {
var freebsdStackParams = &stackParams{}
-// nolint: goconst
var freebsdOopses = append([]*oops{
{
[]byte("Fatal trap"),
diff --git a/pkg/report/linux.go b/pkg/report/linux.go
index c61b2bc37..f4266658c 100644
--- a/pkg/report/linux.go
+++ b/pkg/report/linux.go
@@ -251,7 +251,7 @@ func (ctx *linux) reportMinLines(oopsLine []byte) int {
}
// Yes, it is complex, but all state and logic are tightly coupled. It's unclear how to simplify it.
-// nolint: gocyclo, gocognit
+// nolint: gocyclo
func (ctx *linux) findReport(output []byte, oops *oops, startPos int, context string, useQuestionable bool) (
endPos, reportEnd int, report []byte, prefix [][]byte) {
// Prepend 5 lines preceding start of the report,
diff --git a/pkg/stat/sample/pvalue.go b/pkg/stat/sample/pvalue.go
index acfff4bc4..9428c8f24 100644
--- a/pkg/stat/sample/pvalue.go
+++ b/pkg/stat/sample/pvalue.go
@@ -4,7 +4,7 @@
package sample
// TODO: I didn't find the substitution as of Feb 2023. Let's keep it as is while it works.
-import "golang.org/x/perf/benchstat" // nolint:all
+import "golang.org/x/perf/benchstat" // nolint:staticcheck
// Mann-Whitney U test.
func UTest(old, new *Sample) (pval float64, err error) {
diff --git a/pkg/updater/updater.go b/pkg/updater/updater.go
index 00181f732..bf7b816ca 100644
--- a/pkg/updater/updater.go
+++ b/pkg/updater/updater.go
@@ -242,7 +242,6 @@ func (upd *Updater) pollAndBuild(lastCommit string) string {
return commit.Hash
}
-// nolint: goconst // "GOPATH=" looks good here, ignore
func (upd *Updater) build(commit *vcs.Commit) error {
// syzkaller testing may be slowed down by concurrent kernel builds too much
// and cause timeout failures, so we serialize it with other builds:
diff --git a/pkg/validator/validator_test.go b/pkg/validator/validator_test.go
index ffe935600..d2fc188cd 100644
--- a/pkg/validator/validator_test.go
+++ b/pkg/validator/validator_test.go
@@ -24,7 +24,6 @@ func TestIsCommitHash(t *testing.T) {
validator.CommitHash("!311c1b497e51a628aa89e7cb954481e5f9dced2", "valName").Err.Error())
}
-// nolint: dupl
func TestIsNamespaceName(t *testing.T) {
assert.True(t, validator.NamespaceName("upstream").Ok)
assert.False(t, validator.NamespaceName("up").Ok)
@@ -65,7 +64,6 @@ func TestIsDashboardClientKey(t *testing.T) {
validator.DashClientKey("clKey", "clientKey").Err.Error())
}
-// nolint: dupl
func TestIsKernelFilePath(t *testing.T) {
assert.True(t, validator.KernelFilePath("io_uring/advise.c").Ok)
assert.True(t, validator.KernelFilePath("io-uring/advise.c").Ok)
diff --git a/pkg/vcs/vcs.go b/pkg/vcs/vcs.go
index 95167d2e9..42a344e56 100644
--- a/pkg/vcs/vcs.go
+++ b/pkg/vcs/vcs.go
@@ -317,7 +317,6 @@ func runSandboxed(dir, command string, args ...string) ([]byte, error) {
}
var (
- // nolint: lll
gitLocalRepoRe = regexp.MustCompile(`^file:///[a-zA-Z0-9-_./~]+(/)?$`)
// nolint: lll
gitRemoteRepoRe = regexp.MustCompile(`^(git|ssh|http|https|ftp|ftps|sso)://[a-zA-Z0-9-_.]+(:[0-9]+)?(/[a-zA-Z0-9-_./~]+)?(/)?$`)
@@ -382,7 +381,6 @@ func FileLink(url, hash, file string, line int) string {
return link(url, hash, file, line, 3)
}
-// nolint: goconst
func link(url, hash, file string, line, typ int) string {
if url == "" || hash == "" {
return ""
diff --git a/pkg/vcs/vcs_test.go b/pkg/vcs/vcs_test.go
index 7abeba55b..ae48adb01 100644
--- a/pkg/vcs/vcs_test.go
+++ b/pkg/vcs/vcs_test.go
@@ -244,13 +244,11 @@ func TestFileLink(t *testing.T) {
}
func TestParse(t *testing.T) {
- // nolint: lll
test1 := []byte(`Foo Bar <a@email.com> (maintainer:KERNEL)
Foo Bar<b@email.com> (reviewer:KERNEL)
<somelist@list.com> (open list:FOO)
"Supporter Foo" <c@email.com> (supporter:KERNEL)
linux-kernel@vger.kernel.org (open list)`)
- // nolint: lll
test2 := []byte(`Foo Bar <a@email.com> (maintainer:KERNEL)
Foo Bar<b@email.com> (reviewer:KERNEL)
"Supporter Foo" <c@email.com> (supporter:KERNEL)