function handleSubmit(values: FormValues) {
}
export function Form() {
return <form onSubmit={handleSubmit}>...</form>
}
Deterministic AST match: flags function bodies that contain no statements.
A function with no body — usually a placeholder the agent stubbed to make a signature compile and forgot to fill in.
Each example shows the exact code shape the rule is looking for, then the smallest version that keeps the intent without hiding risk or adding noise.
function handleSubmit(values: FormValues) {
}
export function Form() {
return <form onSubmit={handleSubmit}>...</form>
}
Deterministic AST match: flags function bodies that contain no statements.
function handleSubmit(values: FormValues) {
return saveDraft(values)
}
export function Form() {
return <form onSubmit={handleSubmit}>...</form>
}
Implement the body, remove the unused hook, or make the no-op explicit only when the surrounding API requires it. A function that silently does nothing should not look like finished behavior.
When asked to scaffold, agents stub functions to make types resolve, then forget to come back. The empty body ships and silently no-ops.
ai-slop/empty-function
ai-slop
Deterministic AST match: flags function bodies that contain no statements.
Intentional no-op callbacks, abstract method stubs, and interface declarations are not flagged.
Provenance: repeated across public scans as scaffolding left unfinished.