From 02d129fe26c31412aad2e815db95ebe2dd99413f Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 27 Mar 2025 08:25:44 +0100 Subject: all: opt-out some functions to enforce linter checks New code will be limited to max 7 function params. --- dashboard/app/reporting.go | 1 + pkg/compiler/check.go | 1 + pkg/cover/file.go | 1 + pkg/instance/instance.go | 2 ++ prog/size.go | 1 + 5 files changed, 6 insertions(+) diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index 6171ad487..b73bab8ac 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -1052,6 +1052,7 @@ func incomingCommandUpdate(c context.Context, now time.Time, cmd *dashapi.BugUpd return true, "", nil } +// nolint:revive func incomingCommandCmd(c context.Context, now time.Time, cmd *dashapi.BugUpdate, bug, dup *Bug, bugReporting *BugReporting, final bool, stateEnt *ReportingStateEntry) (bool, string, error) { switch cmd.Status { diff --git a/pkg/compiler/check.go b/pkg/compiler/check.go index fbf84857d..bd3489ccc 100644 --- a/pkg/compiler/check.go +++ b/pkg/compiler/check.go @@ -872,6 +872,7 @@ func (comp *compiler) checkConstructors() { } } +// nolint:revive func (comp *compiler) checkTypeCtors(t *ast.Type, dir prog.Dir, isArg, canCreate bool, ctors, inputs map[string]bool, checked map[structDir]bool, neverOutAt *ast.Pos) { desc, args, base := comp.getArgsBase(t, isArg) diff --git a/pkg/cover/file.go b/pkg/cover/file.go index ea6c326f0..f96deb677 100644 --- a/pkg/cover/file.go +++ b/pkg/cover/file.go @@ -50,6 +50,7 @@ func RendFileCoverage(repo, forCommit, filePath string, fileProvider covermerger return rendResult(files[repoCommit], mr, renderConfig), nil } +// nolint:revive func GetMergeResult(c context.Context, ns, repo, forCommit, sourceCommit, filePath string, proxy covermerger.FuncProxyURI, tp coveragedb.TimePeriod) (*covermerger.MergeResult, error) { config := &covermerger.Config{ diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 83a855e36..95c0463b5 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -464,6 +464,7 @@ func (inst *inst) csourceOptions() (csource.Options, error) { return opts, nil } +// nolint:revive func ExecprogCmd(execprog, executor, OS, arch, vmType string, opts csource.Options, optionalFlags bool, slowdown int, progFile string) string { repeatCount := 1 @@ -500,6 +501,7 @@ var MakeBin = func() string { return "make" }() +// nolint:revive func RunnerCmd(prog, fwdAddr, os, arch string, poolIdx, vmIdx int, threaded, newEnv bool) string { return fmt.Sprintf("%s -addr=%s -os=%s -arch=%s -pool=%d -vm=%d "+ "-threaded=%t -new-env=%t", prog, fwdAddr, os, arch, poolIdx, vmIdx, threaded, newEnv) diff --git a/prog/size.go b/prog/size.go index d354aadbe..c8f6dfd2e 100644 --- a/prog/size.go +++ b/prog/size.go @@ -22,6 +22,7 @@ func (target *Target) assignSizes(args []Arg, fields []Field, parents parentStac } } +// nolint:revive func (target *Target) assignArgSize(arg Arg, args []Arg, fields []Field, parents parentStack, syscallArgs []Arg, syscallFields []Field, autos map[Arg]bool, overlayField int) { if arg = InnerArg(arg); arg == nil { -- cgit mrf-deployment