Skip to main content
aislop organizes its 50+ rules into six engines, each targeting a different class of problem. All six run in parallel on every scan. This page gives you a practical overview of what each engine catches so you can understand your findings, tune severities, and decide which engines matter most for your project.

Formatting

The Formatting engine enforces consistent code style using the best-in-class formatter for each language. Formatting findings carry the lowest default weight (0.3), so they inform without dominating your score.
LanguageFormatter
TypeScript / JavaScriptBiome
Expo / React NativeBiome
Pythonruff format
Gogofmt
Rustcargo fmt
Rubyrubocop
PHPphp-cs-fixer

Linting

The Linting engine catches language-specific bugs, anti-patterns, and bad practices using established, widely-trusted tools.
LanguageTool
TypeScript / JavaScriptoxlint (bundled, with React / Next.js awareness)
Expo / React Nativeoxlint + expo-doctor (project health, dependency checks)
Pythonruff
Gogolangci-lint
Rustclippy
Rubyrubocop

Code Quality

The Code Quality engine measures structural complexity, locates dead code, and identifies unused dependencies. All thresholds are configurable.
RuleWhat it checksDefault threshold
complexity/function-too-longFunctions that exceed a line limit. For Python, only logical body code counts — signatures, docstrings, comments, and blank lines are excluded.80 lines
complexity/file-too-largeFiles that exceed a line limit400 lines
complexity/deep-nestingControl-flow nesting beyond a depth limit5 levels
complexity/too-many-paramsFunctions with too many parameters. For Python, only required parameters count — self/cls, *args/**kwargs, separators, and defaulted params are excluded.6 params

AI Slop

The AI Slop engine is what makes aislop unique. It carries the highest default weight (2.5) because these are the patterns AI coding agents — Claude Code, Cursor, Codex, OpenCode — leave behind that pass lint and tests but quietly rot a codebase.
RuleSeverityWhat it catches
ai-slop/trivial-commentwarningComments that restate the code (// Import React, // Return the value)
ai-slop/narrative-commentwarningDecorative separators, phase/section headers, JSDoc preambles without meaningful tags, and longer prose blocks with an AI-narration signal (restatement openers, step-by-step narration). Length alone is not flagged.
ai-slop/meta-commentwarningComments about implementation phases, agent behavior, or generated-code process instead of the code itself
ai-slop/todo-stubinfoUnresolved TODO/FIXME/HACK comments — a TODO that links a tracking issue is spared
ai-slop/generic-naminginfoAI-generated names: helper_1, data2, temp1
RuleSeverityWhat it catches
ai-slop/swallowed-exceptionerrorEmpty catch blocks, or catch blocks that only log (JS/TS/Python/Go/Ruby)
ai-slop/silent-recoverywarningCatch blocks that log without including the caught error and then continue
ai-slop/redundant-try-catchwarningJS/TS catch blocks that only rethrow the same error without adding context, cleanup, or recovery
ai-slop/python-bare-exceptwarningPython except: blocks that catch everything without naming an exception type
ai-slop/python-broad-exceptwarningPython broad exception handlers with silent/pass-style bodies
RuleSeverityWhat it catches
ai-slop/unsafe-type-assertionwarningas any casts in TypeScript
ai-slop/double-type-assertionwarningThe as unknown as X escape-hatch pattern
ai-slop/ts-directiveinfo@ts-ignore / @ts-expect-error usage
ai-slop/redundant-type-coercionwarningTypeScript primitive parameters re-coerced with String(...), Number(...), or Boolean(...)
ai-slop/duplicate-type-declarationwarningExported TypeScript type/interface declarations with the same name and shape repeated across files
RuleSeverityWhat it catches
ai-slop/unreachable-codewarningCode after return / throw statements
ai-slop/constant-conditionwarningif (true), if (false), if (0)
ai-slop/empty-functioninfoEmpty function bodies
ai-slop/thin-wrapperwarningFunctions that only forward their own parameters unchanged to another function — a call that transforms its arguments is not flagged
ai-slop/console-leftoverwarningconsole.log / debug / info left in production code
RuleSeverityWhat it catches
ai-slop/unused-importwarningUnused imports in JS/TS and Python
ai-slop/duplicate-importwarningMultiple imports from the same module that should be merged
ai-slop/hallucinated-importerrorJS/TS imports of packages not declared in the project manifest
RuleSeverityWhat it catches
ai-slop/hardcoded-urlwarningEnvironment-specific URLs hardcoded in production code instead of env/config
ai-slop/hardcoded-idwarningProvider/project IDs hardcoded in production code instead of env/config
RuleSeverityWhat it catches
ai-slop/python-mutable-defaultwarningFunction defaults like [], {}, or set() that are shared across calls
ai-slop/python-print-debugwarningprint(...) debug output left in production modules
ai-slop/python-range-len-loopinfofor i in range(len(items)) loops that usually want direct iteration or enumerate()
ai-slop/python-chained-dict-getwarning.get(..., {}).get(...) fallback chains that hide missing-data cases
ai-slop/python-repetitive-dispatchwarningRepeated equality branch ladders that should become a table, set, or handler map
ai-slop/python-isinstance-ladderwarningRepeated isinstance(...) ladders that should become a handler map or normalized representation
RuleSeverityWhat it catches
ai-slop/go-library-panicwarningGo panic(...) calls in non-main library code unless clearly intentional
ai-slop/rust-non-test-unwrapwarningRust .unwrap() in production code where errors should be handled or documented
ai-slop/rust-todo-stubwarningRust todo!() stubs in production code

Security

The Security engine finds hardcoded secrets, unsafe code constructs, and vulnerable dependencies. It carries a default weight of 1.5 — second only to AI Slop.
RuleWhat it catches
security/hardcoded-secretAPI keys, AWS credentials, JWT tokens, database URLs, passwords
security/evaleval() usage in JS/TS, Python, Ruby, and PHP
security/innerhtmlDirect .innerHTML assignment
security/dangerously-set-innerhtmlReact dangerouslySetInnerHTML usage that needs sanitization
security/sql-injectionString concatenation in SQL queries
security/shell-injectionUser input passed to command execution
security/vulnerable-dependencyDependency audit via npm, pip, cargo, and govulncheck
security/dependency-audit-skippedAudit could not run because tooling or lockfile context was missing

Architecture (opt-in)

The Architecture engine runs custom structural rules you define yourself. It is disabled by default — enable it with engines.architecture: true in .aislop/config.yml and create a .aislop/rules.yml file.
Rule typeWhat it does
forbid_importBans a package from being imported anywhere in the project (e.g. ban axios in favor of fetch)
forbid_import_from_pathPrevents specific paths from importing specific modules (e.g. controllers cannot import database modules directly)
require_patternAsserts that files matching a path pattern must include a required code pattern (e.g. error handling in all API routes)

Suppressing findings inline

When you know a finding is a false positive or an intentional exception, you can suppress it without changing your config.
// aislop-ignore-next-line ai-slop/empty-fallback -- options is validated upstream
const opts = { ...defaults, ...(input || {}) };

const legacy = doThing(); // aislop-ignore-line
# aislop-ignore-file
  • aislop-ignore-next-line suppresses findings on the next line
  • aislop-ignore-line suppresses findings on the same line
  • aislop-ignore-file (placed anywhere in the file) suppresses findings for the entire file
You can scope a suppression to one or more specific rule IDs, or omit the rule name to silence every rule on that line. Add a -- followed by a reason to document why the suppression exists. The directive works in any comment syntax (//, #, <!-- -->). Suppressed findings are excluded before scoring, and the scan output reports how many were silenced.
Blanket aislop-ignore-file directives can mask real problems. Prefer rule-scoped suppressions and always include a reason.
For the complete list of all rules with their IDs, severities, and supported languages, see the Rules Reference.