Skip to main content
aislop organizes every check into six engines that run in parallel, so your scan finishes in sub-second time regardless of project size. Each engine targets a distinct quality dimension, from basic formatting consistency all the way to the AI-generated patterns that can silently degrade your codebase. This page documents every rule across all six engines so you know exactly what aislop is checking and why.

Formatting

The formatting engine enforces consistent code style using the best-in-class formatter for each language. Formatting findings are weighted at 0.3 (the lowest engine weight) because style differences don’t indicate broken logic — but they still appear in your report so nothing stays hidden.
LanguageTool
TypeScript / JavaScriptBiome
Pythonruff format
Gogofmt
Rustcargo fmt
Rubyrubocop
PHPphp-cs-fixer

Linting

The linting engine catches bugs and bad practices using the fastest available linter for each language. For JS/TS projects, oxlint ships bundled so you don’t need to install anything separately.
LanguageTool
TypeScript / JavaScriptoxlint (bundled, with React/Next.js awareness)
Expo / React Nativeexpo-doctor (project health, dependency checks)
Pythonruff
Gogolangci-lint
Rustclippy
Rubyrubocop

Code Quality

The code quality engine measures structural complexity, surfaces dead code, and identifies unused dependencies. knip/* rules apply to JS/TS projects only and require a package.json to be present.
Rule IDWhat it checks
complexity/function-too-longFunctions exceeding the configurable line limit (default: 80). For Python, only logical body lines count — signatures, docstrings, comments, and blank lines are excluded. async def and multi-line wrapped signatures are detected.
complexity/file-too-largeFiles exceeding the configurable line limit (default: 400)
complexity/deep-nestingControl-flow nesting beyond the configurable threshold (default: 5)
complexity/too-many-paramsFunctions with too many parameters (default: 6). For Python, only required parameters count — self/cls, *args/**kwargs, *// separators, and defaulted parameters are excluded.
code-quality/duplicate-blockRepeated blocks of implementation code that should be extracted or shared
code-quality/repeated-chained-callRepeated long call chains on the same receiver that should be cached or factored out
code-quality/unused-declarationUnused top-level declarations that are safe to remove
knip/filesUnused files not imported anywhere (JS/TS; fixable with fix -f)
knip/exportsUnused exports (JS/TS)
knip/typesUnused exported types (JS/TS)
knip/dependenciesUnused dependencies listed in package.json (fixable with fix)
knip/devDependenciesUnused devDependencies in package.json (fixable with fix)
knip/unlistedPackages imported in code but missing from package.json
knip/unresolvedImports that cannot be resolved
knip/binariesBinaries used in scripts but not declared in package.json
knip/duplicatesDuplicate exports reported by knip

AI Slop

These are the rules that make aislop unique. They specifically target the patterns that AI coding assistants tend to leave behind — from narrative comments that restate the code to swallowed exceptions that hide runtime failures. The AI slop engine carries the highest default weight (2.5) in your score.
Style and maintainability rules (trivial-comment, narrative-comment, file-too-large, function-too-long) contribute half their normal score weight. They still appear in your report so nothing is hidden, but genuine slop — swallowed errors, dead code, hallucinated imports — drives your score more than house style.
Rule IDSeverityWhat 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, cross-reference commentary, and prose blocks with an AI-narration signal (restatement openers or step-by-step narration). Length alone is not flagged.
ai-slop/swallowed-exceptionerrorEmpty catch blocks and catch blocks that only log (JS/TS/Python/Go/Ruby/Java)
ai-slop/silent-recoverywarningCatch blocks that log without including the caught error and then continue execution
ai-slop/meta-commentwarningComments about implementation phases, agent behavior, or generated-code process rather than the code itself
ai-slop/redundant-try-catchwarningJS/TS catch blocks that only rethrow the same error without adding context, cleanup, or recovery
ai-slop/redundant-type-coercionwarningTypeScript primitive parameters re-coerced with String(...), Number(...), or Boolean(...)
ai-slop/duplicate-type-declarationwarningExported TypeScript type/interface declarations repeated with the same name and shape across files
ai-slop/thin-wrapperwarningFunctions that only forward their own parameters unchanged to another function (call sites that transform arguments are not flagged)
ai-slop/generic-naminginfoAI-generated placeholder names such as helper_1, data2, or temp1
ai-slop/unused-importwarningUnused imports (JS/TS and Python)
ai-slop/console-leftoverwarningconsole.log / console.debug / console.info calls left in production code
ai-slop/todo-stubinfoUnresolved, untracked TODO/FIXME/HACK comments (TODOs that link a tracking issue are spared)
ai-slop/unreachable-codewarningCode after return or throw statements
ai-slop/constant-conditionwarningAlways-true or always-false conditions such as if (true), if (false), or if (0)
ai-slop/empty-functioninfoEmpty function bodies
ai-slop/unsafe-type-assertionwarningas any casts in TypeScript
ai-slop/double-type-assertionwarningThe as unknown as X double-cast pattern in TypeScript
ai-slop/ts-directiveinfo@ts-ignore and @ts-expect-error suppression comments
ai-slop/duplicate-importwarningMultiple import statements from the same module that should be merged
ai-slop/hardcoded-urlwarningEnvironment-specific URLs hardcoded in production code instead of environment variables or config
ai-slop/hardcoded-idwarningProvider or project IDs hardcoded in production code instead of environment variables or config
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 or pass-style bodies
ai-slop/python-mutable-defaultwarningPython function defaults such as [], {}, or set() that are shared across calls
ai-slop/python-print-debugwarningPython print(...) debug output left in production modules
ai-slop/python-range-len-loopinfoPython for i in range(len(items)) loops that should use direct iteration or enumerate()
ai-slop/python-chained-dict-getwarningPython .get(..., {}).get(...) fallback chains that hide missing-data cases
ai-slop/python-repetitive-dispatchwarningRepeated Python equality branch ladders that should become a table, set, or handler map
ai-slop/python-isinstance-ladderwarningRepeated Python isinstance(...) ladders that should become a handler map or normalized representation
ai-slop/go-library-panicwarningGo panic(...) calls in non-main library code unless clearly intentional
ai-slop/rust-non-test-unwrapwarningRust .unwrap() calls in production code where errors should be handled or documented
ai-slop/rust-todo-stubwarningRust todo!() stubs in production code
ai-slop/hallucinated-importerrorImports of JS/TS packages not declared in the project manifest
Rules with error severity (swallowed-exception, hallucinated-import) carry a base penalty of 3.0 — three times the weight of a warning. Fixing these two rule families has the biggest positive impact on your score.

Security

The security engine finds secrets, risky constructs, and vulnerable dependencies. Security findings carry a default engine weight of 1.5 in your score.
security/hardcoded-secret is an error-severity rule. Any confirmed secret in your codebase should be rotated immediately — aislop’s detection is a signal to act, not a complete audit.
Rule IDWhat it catches
security/hardcoded-secretAPI keys, AWS credentials, JWT tokens, database URLs, and passwords
security/evaleval() usage in JS/TS, Python, Ruby, and PHP
security/innerhtmlDirect .innerHTML assignment
security/dangerously-set-innerhtmlReact dangerouslySetInnerHTML usage that requires sanitization
security/sql-injectionString concatenation used to build SQL queries
security/shell-injectionUser input passed to command execution APIs
security/vulnerable-dependencyKnown-vulnerable packages in npm, pip, cargo, and Go dependency audits
security/dependency-audit-skippedDependency audit could not run because tooling or a lockfile was missing

Architecture (opt-in)

The architecture engine enforces custom import and path rules you define in .aislop/rules.yml. It is disabled by default — enable it by adding engines.architecture: true to your config.
Add the following to .aislop/config.yml:
engines:
  architecture: true
Then create .aislop/rules.yml with your custom rules. See the architecture rules guide for a complete sample file.
Three rule types are available:
Rule typeWhat it enforcesExample
forbid_importBans a package anywhere in the projectForbid axios project-wide
forbid_import_from_pathPrevents one path pattern from importing anotherControllers cannot import database modules
require_patternAsserts that files matching a glob contain a required constructRequire error handling in all API route files

Supported Languages Matrix

The table below shows which engines and rule sets are active for each language aislop supports.
LanguageFormatLintCode qualityAI slopSecurity
TypeScriptBiomeoxlintknip, complexityAll rulesAll rules
JavaScriptBiomeoxlintknip, complexityAll rulesAll rules
Expo / React NativeBiomeoxlint + expo-doctorknip, complexityAll rulesAll rules
PythonruffruffcomplexityImports, exceptions, commentsSecrets, audit
Gogofmtgolangci-lintcomplexityExceptions, commentsSecrets, audit
Rustcargo fmtclippycomplexityCommentsSecrets, audit
RubyrubocoprubocopcomplexityExceptions, commentsSecrets
PHPphp-cs-fixercomplexityCommentsSecrets