From 1407dd9015e310a72e304d961d10c5d82492732a Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 22 Jan 2026 17:28:19 +0100 Subject: [PATCH 1/2] pkg/report: refactor to remove nolint --- pkg/report/linux.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/report/linux.go b/pkg/report/linux.go index 01949f304962..70384860c81d 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -63,8 +63,9 @@ func ctorLinux(cfg *config) (reporterImpl, []string, error) { vmlinux: vmlinux, symbols: symbols, } - // nolint: lll - ctx.consoleOutputRe = regexp.MustCompile(`^(?:\*\* [0-9]+ printk messages dropped \*\* )?(?:.* login: )?(?:\<[0-9]+\>)?\[ *[0-9]+\.[0-9]+\](\[ *(?:C|T)[0-9]+\])? `) + ctx.consoleOutputRe = regexp.MustCompile( + `^(?:\*\* [0-9]+ printk messages dropped \*\* )?` + + `(?:.* login: )?(?:\<[0-9]+\>)?\[ *[0-9]+\.[0-9]+\](\[ *(?:C|T)[0-9]+\])? `) ctx.taskContext = regexp.MustCompile(`\[ *T[0-9]+\]`) ctx.cpuContext = regexp.MustCompile(`\[ *C[0-9]+\]`) ctx.questionableFrame = regexp.MustCompile(`(\[\<[0-9a-f]+\>\])? \? `) From 277055103e7684a251c57cfd2d22b8539031d89d Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 22 Jan 2026 17:28:41 +0100 Subject: [PATCH 2/2] pkg/ifuzz/powerpc: refactor to remove nolint --- pkg/ifuzz/powerpc/pseudo.go | 94 +++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/pkg/ifuzz/powerpc/pseudo.go b/pkg/ifuzz/powerpc/pseudo.go index fcc7b0941ffe..2ffe3767c3ca 100644 --- a/pkg/ifuzz/powerpc/pseudo.go +++ b/pkg/ifuzz/powerpc/pseudo.go @@ -16,58 +16,60 @@ const ( SprnSrr1 = 0x01B // msr for rfid (SPRN_SRR1) ) -// nolint:dupl func (insnset *InsnSet) initPseudo() { - insnset.Insns = append(insnset.Insns, &Insn{ - Name: "PSEUDO_hypercall", - Priv: true, - Pseudo: true, - generator: func(cfg *iset.Config, r *rand.Rand) []byte { - gen := makeGen(insnset, cfg, r) - gen.sc(1) - return gen.text + type pseudoInsn struct { + Name string + generator func(cfg *iset.Config, r *rand.Rand) []byte + } + for _, insn := range []pseudoInsn{ + { + Name: "PSEUDO_hypercall", + generator: func(cfg *iset.Config, r *rand.Rand) []byte { + gen := makeGen(insnset, cfg, r) + gen.sc(1) + return gen.text + }, }, - }) - insnset.Insns = append(insnset.Insns, &Insn{ - Name: "PSEUDO_syscall", - Priv: true, - Pseudo: true, - generator: func(cfg *iset.Config, r *rand.Rand) []byte { - gen := makeGen(insnset, cfg, r) - gen.sc(0) - return gen.text + { + Name: "PSEUDO_syscall", + generator: func(cfg *iset.Config, r *rand.Rand) []byte { + gen := makeGen(insnset, cfg, r) + gen.sc(0) + return gen.text + }, }, - }) - insnset.Insns = append(insnset.Insns, &Insn{ - Name: "PSEUDO_ultracall", - Priv: true, - Pseudo: true, - generator: func(cfg *iset.Config, r *rand.Rand) []byte { - gen := makeGen(insnset, cfg, r) - gen.sc(2) - return gen.text + { + Name: "PSEUDO_ultracall", + generator: func(cfg *iset.Config, r *rand.Rand) []byte { + gen := makeGen(insnset, cfg, r) + gen.sc(2) + return gen.text + }, }, - }) - insnset.Insns = append(insnset.Insns, &Insn{ - Name: "PSEUDO_rtas", - Priv: true, - Pseudo: true, - generator: func(cfg *iset.Config, r *rand.Rand) []byte { - gen := makeGen(insnset, cfg, r) - gen.rtas() - return gen.text + { + Name: "PSEUDO_rtas", + generator: func(cfg *iset.Config, r *rand.Rand) []byte { + gen := makeGen(insnset, cfg, r) + gen.rtas() + return gen.text + }, }, - }) - insnset.Insns = append(insnset.Insns, &Insn{ - Name: "PSEUDO_rfid", - Priv: true, - Pseudo: true, - generator: func(cfg *iset.Config, r *rand.Rand) []byte { - gen := makeGen(insnset, cfg, r) - gen.rfid() - return gen.text + { + Name: "PSEUDO_rfid", + generator: func(cfg *iset.Config, r *rand.Rand) []byte { + gen := makeGen(insnset, cfg, r) + gen.rfid() + return gen.text + }, }, - }) + } { + insnset.Insns = append(insnset.Insns, &Insn{ + Name: insn.Name, + Priv: true, + Pseudo: true, + generator: insn.generator, + }) + } } type generator struct {