Flagged example
function reconcile(orders: Order[]) {
console.log('reconciling', orders.length)
for (const o of orders) {
console.log('processing', o.id, o)
process(o)
}
}
Why this trips
Deterministic AST match against debug-print calls (`console.log`, language equivalents) outside designated logging.
Clean example
function reconcile(orders: Order[]) {
log.debug('reconciling', { count: orders.length })
for (const o of orders) {
process(o)
}
}
What changed
Remove temporary debug output or replace it with the project's structured logger at the correct level. Include stable fields, not raw objects dumped from a debugging session.