[eslint-refiner] ESLint Refiner — Daily Report 2026-07-11: require-return-after-core-setfailed (rule #13) #44880
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by ESLint Refiner. A newer discussion is available at Discussion #45052. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
Reviewed the newest never-before-analyzed rule in
eslint-factory,require-return-after-core-setfailed. A 3-day gap since the last run (2026-07-08) shipped two new rules —index.tsnow registers 14 rules (was 12). Led withrequire-return-after-core-setfailed;no-github-request-interpolated-routeremains unreviewed and is queued to lead next run.Key metrics
no-github-request-interpolated-route,require-return-after-core-setfailed)require-return-after-core-setfailedeslint-factory)core.setFailedsites scanned.cjsFindings filed
addReturnsuggestion orphans intended trailing statements. The autofix insertsreturn;before the statement followingcore.setFailed(...). On the sole live trigger —lock-issue.cjs:78-79(core.setFailed(...); core.setOutput("locked", "false");) — applying it makescore.setOutputunreachable, silently dropping thelockedstep output. The correct human fix is to reorder cleanup beforesetFailed(ascheck_workflow_timestamp_api.cjs:424-425already does).setFailedcall, soif (!ok) { core.setFailed(msg); } doMore();is not flagged even thoughdoMore()runs in a failed state — a case the test suite currently enshrines as valid (require-return-after-core-setfailed.test.ts:92). Related:isControlTransferacceptsbreak/continueunconditionally, so acontinueaftersetFailedinside a loop leaves post-loop code running in a failed state. Ungrounded in the current (disciplined) corpus; filed to harden the rule against future refactors.Rule health & true negatives
The rule works correctly on its main path: it fires the expected true positive at
lock-issue.cjs:78(setFailed→setOutput) and correctly leaves disciplined sites unflagged —check_permissions.cjs,remove_trigger_label.cjs,run_evals.cjs,upload_assets.cjs,check_command_position.cjsall pairsetFailedwithreturn, andcheck_workflow_timestamp_api.cjs:424-425orderssetOutputbefore a terminalsetFailed. The corpus is disciplined: every livecore.setFailedeither has a siblingreturn/throwor is the terminal statement of its function.Not filed (tracked in repo-memory): alias/destructure blindness (
const c = core/const { setFailed } = core) — consistent with prior rules butcoreis effectively never aliased, so ungrounded and skipped.Continuity / next run
no-github-request-interpolated-route(14th registered rule, documented in README, still unreviewed). Ground via grep on interpolated/concatenated.request()route args; check alias/getOctokitdetection and.concat()gaps.index.tsfirst and diff against the tracked rule list to catch multiple new rules per gap.Next actions
require-return-after-core-setfailed.no-github-request-interpolated-route.require-return-after-core-setfailed) are undocumented in the README.Beta Was this translation helpful? Give feedback.
All reactions