EVIDENCE 001 CASE #4ADE80 PATROL UNIT 22C5 JURISDICTION: localhost

YOUR CODE
JUST GOT BUSTED.

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`.

$
INSTALL THE COP SEE THE RAP SHEET
[10-4] PATROL ACTIVE VIOLATION: unused-import @ src/auth.ts:42 UNIT 7 RESPONDING WARNING: console.log @ src/api.ts:118 PASS: 214 files clean DISPATCH: pre-commit hook armed VIOLATION: any-type @ src/store.ts:9 CITATION ISSUED -- $0.00 END OF SHIFT? NOT TODAY.

THE INCIDENT BOARD

Recent calls from the field. Pin it, stamp it, file it. Every commit gets a record.

VIOLATION
CASE #001 · TYPESCRIPT

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';
severity: highfix: auto
WARNING
CASE #002 · DEBUG ARTIFACTS

Console.log, Public Disturbance

Suspect was overheard yelling diagnostic output to stdout in production code. Verbal warning issued.

~ console.log('debug:', user);
~ console.warn('TODO: remove me');
severity: mediumfix: manual
PASS
CASE #003 · COMPLIANT

Module: ./utils/format.ts

Clean record. No warnings, no violations, no jaywalking. This module is a model citizen.

+ 12 functions reviewed
+ 100% type coverage
+ 0 incidents on file
severity: nonestatus: clear
VIOLATION
CASE #004 · TYPE LAW §any

any-type, Resisting Inference

Caught using any in cold blood. Suspect refused to cooperate with the type checker. Booked.

- function pay(x: any): any {
-   return process(x);
- }
severity: criticalfix: required
WARNING
CASE #005 · COMPLEXITY

Cyclomatic Speeding (18 in 10 zone)

Function processOrder() clocked at branching factor 18. Slow it down or split it up. Final warning.

~ if/else chain depth: 6
~ switch arms: 12
severity: mediumfix: refactor
PASS
CASE #006 · STYLE GUIDE

Format Inspection Cleared

All files passed format patrol. Trailing whitespace eliminated, semicolons in formation, indentation tight.

+ 1,847 lines formatted
+ 0 style infractions
+ ready to commit
severity: nonestatus: clear
CODE OF CONDUCT

SIX RULES.
NO EXCEPTIONS.

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.

  1. §01

    No Loitering Imports

    Every import must contribute. Unused symbols are escorted out at build time.

  2. §02

    No any in Public

    Type erasure is a misdemeanor. Narrow it, infer it, or get cited.

  3. §03

    No Debug Graffiti

    console.log, debugger, and TODO tags get hauled in before main.

  4. §04

    Honor the Format

    Style guide is the law. Trailing whitespace, mixed quotes, and rogue tabs do not pass go.

  5. §05

    Keep Complexity Low

    Cyclomatic limits enforced. Over the line? Refactor or take the ticket.

  6. §06

    Document or Explain Yourself

    Public APIs require a statement. No comment? No commit.

APPROVED

DEPUTIZE YOURSELF.

One command. No paperwork.

$ curl -fsSL localcop.dev/install.sh | sh
01Drop into any repo
02Run localcop --init
03Sleep easy. Cop's on duty.
localcop.dev // patrolling localhost since //usr/local/bin BADGE №4ADE80