Skip to content
Documentation menu

Rules

All 33 rules, with the severity each one has at every strictness preset. Every finding prints its rule id, so you always know what to change.

little-owl config --rules

That prints the same table for your project, resolved against your own configuration. Change any severity to off, info, warning or error under rules in your config file.

Architecture

Dependencies pointing the wrong way, loops, and boundaries that were supposed to hold.

RuleRelaxedBalancedStrict
architecture/circular-dependency

Files that import each other, directly or through a chain. Found with Tarjan's algorithm. Type-only imports are excluded, and so is a Python package whose __init__.py re-exports its own submodules — that loop is idiomatic and resolves lazily.

errorerrorerror
architecture/layer-violation

A lower layer importing a higher one — for example data importing UI.

errorerrorerror
architecture/layer-skip

A layer reaching past its neighbour, such as UI importing the database directly. Only when layerPolicy is 'adjacent'.

infowarningerror
architecture/cross-feature-import

One feature reaching into another feature's internals. Requires a feature root, configured or inferred.

infowarningerror
architecture/forbidden-dependency

An import matching a pair you listed in architecture.forbidden.

errorerrorerror
architecture/deep-import-chain

An entry point whose transitive import chain is longer than maxImportDepth.

offinfoinfo
next/server-import-in-client

A 'use client' module importing a package that only runs on the server, such as node:fs, pg or nodemailer. Calling a server action is not reported — that is the pattern working as designed.

errorerrorerror

Complexity

Size and branching, measured from a syntax tree rather than a line count.

RuleRelaxedBalancedStrict
complexity/large-file

A file past the configured line budget.

warningwarningwarning
complexity/large-function

A function longer than maxFunctionLines. Components are excluded.

warningwarningwarning
complexity/large-component

A React component past its own budget, which is separate because components are legitimately longer.

warningwarningwarning
complexity/high-complexity

A function with more independent branches than maxComplexity.

warningwarningwarning
complexity/deep-nesting

Control flow nested past maxNesting inside a single function.

offinfowarning
complexity/too-many-params

A long list of positional parameters, which is easy to call wrongly.

offinfowarning
go/large-package

A Go package that has grown far past the file budget.

infoinfoinfo

Maintainability

Copies that drift apart, imports that go nowhere, and effects that run too often.

RuleRelaxedBalancedStrict
maintainability/duplicate-block

Identical blocks of code appearing in more than one place. Overlapping matches are merged, so a thirty-line copy-paste is one finding rather than two dozen.

offinfowarning
maintainability/unresolved-import

An import matching neither a project file nor a declared package. Asset imports such as CSS and images are not reported.

infoinfoinfo
react/effect-dependency-risk

useEffect called with no dependency array, so it re-runs after every render.

infoinfowarning

Structural patterns

Shapes that appear when code is changed without seeing the whole project. These describe structure only — never who wrote it.

RuleRelaxedBalancedStrict
patterns/duplicate-helper

The same helper name defined and exported in more than one file.

warningwarningwarning
patterns/parallel-implementations

Two modules implementing the same set of names, reported once rather than once per name. A facade that selects between them is not reported.

infowarningwarning
patterns/thin-wrapper

A module whose only job is forwarding a call to another module.

offinfowarning
patterns/abstraction-growth

A directory that has filled up with small modules each used exactly once.

offinfowarning

Type safety

The escape hatches, counted per file rather than flagged individually.

RuleRelaxedBalancedStrict
type-safety/explicit-any

A file leaning on `any` often enough to lose type coverage.

infowarningwarning
type-safety/suppression

@ts-ignore, which stays silent even after the underlying error is gone. @ts-expect-error is not reported.

warningwarningwarning
type-safety/unsafe-assertion

Assertions through any or unknown, which are never verified at runtime.

offinfowarning
type-safety/js-in-ts-project

Plain JavaScript files inside a project set up for TypeScript.

offinfowarning

Dependencies

Hygiene, not security. For vulnerabilities, run your package manager's audit.

RuleRelaxedBalancedStrict
dependencies/major-version-change

A dependency whose major version moved in this change.

warningwarningwarning
dependencies/new-dependency

Dependencies added by this change.

offinfowarning
dependencies/unused-dependency

A declared runtime dependency nothing imports. Type definitions, linters and build tooling are excluded.

offinfoinfo
dependencies/duplicate-dependency

A package declared in both dependencies and devDependencies, so which version wins depends on the package manager.

warningwarningwarning

Python

Line-based checks. Not a replacement for Ruff.

RuleRelaxedBalancedStrict
python/bare-except

`except:` blocks that swallow every exception, including KeyboardInterrupt.

warningwarningwarning
python/mutable-default

Mutable default arguments, evaluated once and shared between calls.

warningwarningwarning
python/global-state

Functions rebinding module-level state with `global`.

infoinfoinfo

Go

Line-based checks. Not a replacement for golangci-lint.

RuleRelaxedBalancedStrict
go/ignored-error

A return value discarded with `_`, which in Go is usually a dropped error.

warningwarningwarning