Unused Imports, Loitering
Three imports caught hanging around ./auth.ts with no apparent purpose. Detained pending tree-shake.
- import { Buffer } from 'node:buffer'; - import lodash from 'lodash'; - import 'reflect-metadata';
A linter, formatter, and policy checker that doesn't ask politely. localcop patrols your repo, writes citations, and impounds bad commits before they hit `main`.
Recent calls from the field. Pin it, stamp it, file it. Every commit gets a record.
Three imports caught hanging around ./auth.ts with no apparent purpose. Detained pending tree-shake.
- import { Buffer } from 'node:buffer'; - import lodash from 'lodash'; - import 'reflect-metadata';
Suspect was overheard yelling diagnostic output to stdout in production code. Verbal warning issued.
~ console.log('debug:', user); ~ console.warn('TODO: remove me');
./utils/format.tsClean record. No warnings, no violations, no jaywalking. This module is a model citizen.
+ 12 functions reviewed + 100% type coverage + 0 incidents on file
any-type, Resisting InferenceCaught using any in cold blood. Suspect refused to cooperate with the type checker. Booked.
- function pay(x: any): any { - return process(x); - }
Function processOrder() clocked at branching factor 18. Slow it down or split it up. Final warning.
~ if/else chain depth: 6 ~ switch arms: 12
All files passed format patrol. Trailing whitespace eliminated, semicolons in formation, indentation tight.
+ 1,847 lines formatted + 0 style infractions + ready to commit
Every codebase needs a beat cop. localcop runs as a pre-commit hook, in CI, or on demand. It doesn't take bribes and it doesn't take Mondays off.
Every import must contribute. Unused symbols are escorted out at build time.
any in PublicType erasure is a misdemeanor. Narrow it, infer it, or get cited.
console.log, debugger, and TODO tags get hauled in before main.
Style guide is the law. Trailing whitespace, mixed quotes, and rogue tabs do not pass go.
Cyclomatic limits enforced. Over the line? Refactor or take the ticket.
Public APIs require a statement. No comment? No commit.
One command. No paperwork.
curl -fsSL localcop.dev/install.sh | sh
localcop --init