Configuration File
Trestle reads .trestlerc.toml files to apply persistent options. The same keys are available on the command line, but a configuration file is preferable for settings that should apply to every scan.
Search order and layering
When Trestle scans a directory, it walks from the filesystem root down to that directory and reads a .trestlerc.toml from every level that contains one. For single-value options (booleans and strings), settings from deeper files override settings from shallower files. For list options (skip-glob, skip-directory-names, and skip-file-names), entries accumulate: every list entry declared in any layer stays active. Command-line options follow the same rule.
A common arrangement is one file at the project root with the defaults, and additional files in any subdirectories that need different settings.
File format
Standard TOML, with one flat key per option. The keys match the command-line option names without the leading --:
output-format = "json"
show-summary = false
skip-vcs-ignored = true
skip-directory-names = ["fixtures", "snapshots"]
skip-glob = ["docs/**", "*.snap"]Unknown keys are ignored. When the file does not parse as valid TOML, it is skipped silently.
Keys
Each key accepts the same value type as its command-line counterpart. For the full list of options, their value types, and defaults, see Command Line. Use the option's name without the leading --.
How skip rules combine across layers
Every entry in skip-glob, skip-directory-names, and skip-file-names is scoped to the directory of the .trestlerc.toml that declared it. The rule applies to that directory and everything below it.
- A
skip-globpattern is matched against each path written relative to that directory. - A
skip-directory-namesorskip-file-namesentry matches a directory or file by name, but only inside that directory's subtree.
For example, skip-directory-names = ["fixtures"] in packages/api/.trestlerc.toml skips every fixtures directory under packages/api/. It does not affect packages/web/fixtures/, because that path is outside the subtree where the rule was declared.
When a deeper .trestlerc.toml declares more entries, those entries are added to what the higher files already declared.
Consider this layout:
When Trestle scans packages/api, both skip-glob lists are active:
**/dist/**from the root.trestlerc.tomlis anchored at the project root. It matches anydistdirectory anywhere under the root, so bothdistandpackages/api/distare excluded.fixtures/**frompackages/api/.trestlerc.tomlis anchored atpackages/api. It resolves topackages/api/fixtures/**and excludes only thatfixturesdirectory.
Example
A project-root .trestlerc.toml that emits SARIF to a file, excludes fixtures directories and all .example.env files in the docs directory, and includes remediation guidance (Pro):
output-format = "sarif"
output-file = "trestle.sarif"
explain = true
skip-directory-names = ["fixtures"]
skip-glob = ["docs/**/*.example.env"]