Config File
Createrefactron.yaml in your project root. All fields are optional — Refactron ships with sensible defaults and deep-merges your overrides.
Full Reference
analyzers
Each analyzer can be individually enabled or disabled.
complexity
complexity
Detects functions with cyclomatic complexity above the threshold.What it catches: deeply nested conditionals, long switch statements, functions with many branches.
security
security
Detects common security vulnerabilities.What it catches:
- SQL injection via string formatting (
f"SELECT * FROM {table}") eval()calls- Hardcoded secrets (passwords, API keys, tokens in source)
exec()with dynamic input
code_smell
code_smell
Detects overly long functions/methods.What it catches: functions exceeding
max_method_lines lines (excluding comments and blank lines).dead_code
dead_code
Detects unreachable code after control flow statements.What it catches: code after
return, raise, break, continue that can never execute.type_hints
type_hints
Detects missing type annotations.What it catches (Python): functions missing return type annotations.
What it catches (TypeScript): explicit
any usage.dependencies
dependencies
Detects unused imports.What it catches: imported names that are never referenced in the file body.
performance
performance
Detects common performance anti-patterns.What it catches:
- List concatenation inside loops (
result = result + [item]) awaitcalls inside loops (should bePromise.allor batched)
verification
Controls timeouts for the verification engine.
Critical blast radius issues run the full test suite. Increase
critical_timeout_seconds for large test suites.autofix
dry_run: true is useful in CI pipelines where you want to report fixable issues without applying them.
output
fail_on — exit with code 1 if any issue at or above this severity is found. Useful for CI gates:
