fix(skillcurator): document and scope the intentional nilerr in reviewOne
golangci-lint's nilerr finding was syntactically correct but not a bug: a per-skill parse failure is deliberately converted into a reportable curator.Action instead of propagated as an execution error, because Pass()'s loop aborts the whole batch on a non-nil error -- which would stop reviewing every other skill over one bad file. Confirmed against skillcurator_test.go's existing "must not abort review of the others" coverage before touching anything. Scoped //nolint with the reasoning inline, not a blind suppression.
This commit is contained in:
1 parent
d9b04cdc10
commit
a5cac6e8be
1 file changed
+6
-1
@@ -107,7 +107,12 @@ func (c *Curator) reviewOne(ctx context.Context, name string) ([]curator.Action,
|
||||
|
||||
fm, _, fail := skill.Parse([]byte(sk.Content))
|
||||
if fail != nil {
|
||||
return []curator.Action{{
|
||||
// A parse failure is a per-skill finding to report, not an
|
||||
// execution error to propagate: Pass()'s loop aborts the whole
|
||||
// batch on a non-nil error, which would stop reviewing every
|
||||
// other skill over one bad file (see skillcurator_test.go's
|
||||
// "must not abort review of the others").
|
||||
return []curator.Action{{ //nolint:nilerr
|
||||
Type: ActionInvalid,
|
||||
Detail: name,
|
||||
Reason: fail.Error(),
|
||||
|
||||
Reference in new issue
Block a user