redline
HighAI tellsstub-body

Stubbed implementation

Stubbed implementation. A stub (throw new Error("Not implemented) in shipped code. Callers will hit it at runtime.

This is how the comment reads inline, under the flagged line.

Why it matters

A function that only throws not implemented passes type checks and review, then fails in production on the first call.

What to do

Implement it or delete it and its callers. Abstract methods belong on an ABC or interface.

Examples

Flagged
export function refund(id: string) {
  throw new Error("Not implemented");
}
Better
export function refund(id: string) {
  return payments.refund(id);
}

What it catches

It reads a pattern on each line, aware of strings and comments. Languages: TypeScript and JavaScript, Python. Scope: Shipped code only. These cases are the rule's own tests: the first set must be flagged and the second must not.

Flagged

function a() { throw new Error("Not implemented yet"); }
src/app.py
def f():
    raise NotImplementedError

Left alone

function a() { throw new Error("Payment declined"); }

Research

Stubs and elided code (`// ... existing code ...`, `raise NotImplementedError`, "implementation here"). Code that looks finished and does nothing passes review and fails in use.

Turn it off or change it

In a config file for the CLI, or in the API's rules field:

{
  "rules": {
    "disable": [
      "stub-body"
    ],
    "severity": {
      "stub-body": "low"
    }
  }
}

Read the source or report a false positive.