Linting Configuration
Linting Configuration
8Vast's linter works without any configuration. When you want to change behavior -- disable a rule, raise a threshold, pass flags to Clippy -- create a lint.toml file in your project root.
The config file
Create lint.toml at the root of your project (next to Cargo.toml or package.json):
# Disable a rule entirely
[rules.no-println]
enabled = false
# Change a threshold
[rules.function-too-long]
threshold = 80 # default: 50
[rules.cognitive-complexity]
threshold = 20 # default: 15
[rules.too-many-params]
threshold = 8 # default: 6
Each rule is referenced by its ID. Run 8v lint rules to see all rule IDs, or check the Rules Reference.
Generate a config file
If you'd rather start from a template:
8v lint init
This creates a lint.toml with all rules listed and their default values commented out. Uncomment and change what you need.
Disabling rules
Set enabled = false on any rule:
[rules.no-println]
enabled = false
[rules.no-dbg]
enabled = false
The rule won't fire at all. This is different from inline suppression (vast-lint: skip(...)) which only suppresses a specific occurrence.
Metric thresholds
These rules measure code complexity and flag functions, files, or types that exceed a limit. Every threshold is configurable:
| Rule | Default | What it measures |
|---|---|---|
function-too-long | 50 lines | Function body length |
file-too-long | 500 lines | Total file length |
too-many-params | 6 params | Function parameter count |
nesting-too-deep | 3 levels | Control flow nesting depth |
too-many-let-bindings | 15 bindings | Let bindings in a single function |
cognitive-complexity | 15 | Branching complexity score |
trait-too-many-methods | 8 methods | Methods defined on a single trait |
struct-excessive-bools | 3 bools | Boolean fields on a single struct |
test-too-long | 50 lines | Test function body length |
To change a threshold:
[rules.function-too-long]
threshold = 100
[rules.nesting-too-deep]
threshold = 5
Set these based on your codebase. If your project has legitimate reasons for longer functions (generated code, state machines), raise the limit rather than suppressing every instance.
Severity overrides
You can change a rule's severity:
[rules.no-unwrap]
severity = "error" # default: warning
[rules.function-too-long]
severity = "warning" # keep it advisory
This is useful in CI when you want certain rules to fail the build (error) and others to only inform (warning).
External tools
8Vast auto-detects Clippy, cargo check, tsc, and ESLint. Configure them under [tools]:
# Pass extra arguments to Clippy
[tools.rust.clippy]
args = ["-W", "clippy::unwrap_used", "-W", "clippy::expect_used"]
# Disable cargo check (Clippy already covers it)
[tools.rust.check]
enabled = false
# Enable ESLint with specific extensions
[tools.typescript.eslint]
enabled = true
args = ["--ext", ".ts,.tsx"]
# Disable tsc type checking (if ESLint handles it)
[tools.typescript.tsc]
enabled = false
If a tool isn't installed, 8Vast skips it silently. It won't fail because Clippy isn't on your PATH.
File exclusions
Exclude files or directories from linting:
[files]
exclude = [
"generated/**",
"vendor/**",
"target/**",
"**/*.generated.rs",
]
Glob patterns work. Excluded files are skipped entirely -- no rules run on them, including external tools.
Config resolution
When you run 8v lint, the linter looks for lint.toml starting from the directory you're linting and walking up to the project root. The first one it finds wins. There's no config merging across directories -- one file controls everything.
If no lint.toml exists, all 156 rules run with their default settings, and all detected external tools run with no extra arguments.
Next
- Rules Reference -- see all rule IDs and defaults
- Custom Rules -- write your own rules in YAML