Priority order
Configuration sources are applied highest-priority first:- CLI flags —
--fail-level error - Environment variables —
TALLY_OUTPUT_FAIL_LEVEL=error - Config file —
.tally.tomlortally.toml - Built-in defaults
Config file
File names
tally looks for these config file names, in order:.tally.toml(hidden file, recommended)tally.toml
Discovery
tally uses cascading config discovery similar to Ruff:- Starting from the Dockerfile’s directory, walks up the filesystem.
- Stops at the first
.tally.tomlortally.tomlfound. - Uses that config — no merging with parent configs.
Explicit config path
Override discovery with--config:
Config file reference
- [output]
- [rules]
- [inline-directives]
- [ai]
- [file-validation]
- [slow-checks]
Controls how tally reports violations.
| Option | Default | Description |
|---|---|---|
format | "text" | Output format: text, json, sarif, github-actions, markdown |
path | "stdout" | Output destination: stdout, stderr, or a file path |
show-source | true | Show source code snippets alongside violations |
fail-level | "style" | Minimum severity that produces exit code 1: error, warning, info, style, none |
Environment variables
- Output variables
- Rule variables
- File discovery variables
- Directive variables
- AI variables
| Variable | Description |
|---|---|
TALLY_OUTPUT_FORMAT | Output format: text, json, sarif, github-actions, markdown |
TALLY_FORMAT | Alias for TALLY_OUTPUT_FORMAT |
TALLY_OUTPUT_PATH | Output destination: stdout, stderr, or file path |
TALLY_OUTPUT_SHOW_SOURCE | Show source snippets: true / false |
TALLY_OUTPUT_FAIL_LEVEL | Minimum severity for non-zero exit |
NO_COLOR | Disable colored output (standard env var) |
CLI flags
- Core flags
- Output flags
- Rule flags
- Directive flags
- Fix flags
| Flag | Description |
|---|---|
--config, -c | Path to config file (overrides discovery) |
--exclude | Glob pattern(s) to exclude files (repeatable) |
--context | Build context directory for context-aware rules |
--select | Enable specific rules (repeatable) |
--ignore | Disable specific rules (repeatable) |
Inline directives
Suppress specific violations using inline comment directives directly in your Dockerfile.Next-line directive
Next-line directive
Suppress violations on the next line:Suppress multiple rules with comma-separated values:Suppress all rules on a line:
Global directive
Global directive
Suppress violations throughout the entire file:
Adding reasons
Adding reasons
Document why a rule is suppressed using Use
;reason=:--require-reason (or require-reason = true in .tally.toml) to enforce that all ignore directives include an explanation.Migration compatibility
Migration compatibility
tally supports directive formats from other linters, making migration easy:
Example configurations
Strict CI
Relaxed development
Monorepo setup
Place a root.tally.toml with shared defaults, then override for specific services: