Skip to content

Standalone Usage

Run Code Limit without arguments to see the usage page:

$ codelimit

 Usage: codelimit [OPTIONS] COMMAND [ARGS]...

 CodeLimit: Your refactoring alarm.

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --verbose  -v            Verbose output                                      │
│ --exclude          TEXT  Glob patterns for exclusion [default: None]         │
│ --version  -V            Show version                                        │
│ --help                   Show this message and exit.                         │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ check          Check file(s)                                                 │
│ scan           Scan a codebase                                               │
│ report         Show report for codebase                                      │
│ app            Code Limit GitHub App commands                                │
╰──────────────────────────────────────────────────────────────────────────────╯

Scanning a codebase

To scan a complete codebase run:

codelimit scan path/to/codebase

Viewing a report

To view the report with hard-to-maintain and unmaintainable functions of a codebase that was scanned before run:

Checking files

To check a single file or list of files for functions that need refactoring, run:

codelimit check a.py b.py c.py