Skip to main content
ai-slop/cpp-not-implementedmanual fix

Not-implemented stub.

A function that throws `std::logic_error` or `std::runtime_error` with a "not implemented" message, or asserts `false && "not implemented"`. It compiles and fails at runtime.

Flagged shape and clean shape.

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.

cpp-not-implemented.cpp
✗ Flagged
Money CurrencyConverter::convert(Money amount, Currency target) const {
    throw std::logic_error("convert: not implemented");
}
Why this trips

Deterministic line match: flags `throw std::logic_error("...not implemented...")`, the same with `std::runtime_error`, and `assert(false && "...not implemented...")` or `assert(0 && ...)`, case-insensitive.

cpp-not-implemented.cpp
✓ Clean
Money CurrencyConverter::convert(Money amount, Currency target) const {
    const double rate = rates_.lookup(amount.currency(), target);
    return Money{amount.value() * rate, target};
}
What changed

Implement the function or remove the stub before shipping. If an operation is intentionally unsupported, make that part of the API rather than a placeholder.

Agents stub out functions they could not finish so the build passes, then move on.

How this rule is justified.

Rule id

ai-slop/cpp-not-implemented

Enforcing engine

ai-slop

Detector strategy

Deterministic line match: flags `throw std::logic_error("...not implemented...")`, the same with `std::runtime_error`, and `assert(false && "...not implemented...")` or `assert(0 && ...)`, case-insensitive.

Legitimate code that is NOT flagged

Throws whose message does not say not implemented, other exception types, and text inside comments are not flagged.

Evidence

Part of aislop's C/C++ rule set. C/C++ support, including C/C++-specific AI-slop rules, arrived in aislop v0.14.1.