Auto-Fix¶
tally can apply fixes automatically. Fixes are designed to be:
- Atomic (a fix applies fully or not at all)
- Conflict-aware (overlapping edits are skipped)
- Configurable (per-rule fix modes)
Basic usage¶
Apply safe fixes:
Apply unsafe fixes too (includes AI fixes when enabled):
Limit fixes to specific rules:
tally lint --fix --fix-unsafe --fix-rule hadolint/DL3008 --fix-rule tally/prefer-copy-heredoc Dockerfile
Per-rule fix modes¶
You can control when fixes are allowed in .tally.toml:
[rules.tally.prefer-copy-heredoc]
fix = "always" # default behavior
[rules.tally.prefer-multi-stage-build]
fix = "explicit" # only when --fix-rule includes this rule
Valid values:
always(default)neverexplicit(requires--fix-rule)unsafe-only(requires--fix-unsafe)
AI AutoFix¶
Some fixes are too complex to implement deterministically. For those, tally supports an opt-in AI resolver via ACP.
See: