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:
sam committed 2026-09-03 04:17:05 +10:00
1 parent f08b9b2bc4
commit 28d6e15a4c
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(),