File Formats¶
All configuration is TOML. Unknown keys are errors, reported with file and line.
manifest.toml¶
Location: <project root>/.sawmill/manifest.toml. Full description in
The manifest.
[manifest]
name = "soc" # required
rules = ["vivado.toml"] # plugin-wide rule files
report = "build/${build}/sawmill-report.json"
fail_on = "warning"
[vars] # optional defaults for ${name}
build = "top"
[[target]]
name = "pnr" # required
plugin = "vivado" # required
logs = ["build/${build}/pnr/job_*/vivado.log"] # required, non-empty
rules = ["vivado-pnr.toml"]
fail_on = "critical_warning"
unused_rules = "warn" # warn | ignore
[target.plugin_options]
mode = "implementation"
Key |
Type |
Default |
Notes |
|---|---|---|---|
|
string |
(required) |
Unique across discovered manifests |
|
list |
|
Files in |
|
string |
none |
Relative to the project root |
|
string |
plugin default |
Severity id |
|
string |
none |
Default for |
|
string |
(required) |
Unique within the manifest |
|
string |
(required) |
Installed plugin name |
|
list |
(required) |
Globs relative to the project root |
|
list |
|
Files in |
|
string |
|
Severity id |
|
string |
|
|
|
table |
|
Passed to the plugin’s |
The plugin default fail_on is the plugin’s second-lowest severity level.
[vars] keys are identifiers ([A-Za-z_][A-Za-z0-9_]*). ${name} is
expanded in every logs entry and in report, not in rules,
name or plugin. --var NAME=VALUE overrides or supplies a value.
A $ not followed by { is literal; an unterminated ${ is a
manifest error. A reference with no value is an error (exit 2) when the
target runs or the report path is resolved.
Rule files¶
Location: <project root>/.sawmill/rules/*.toml. Full description in
Rules.
[rules]
plugin = "vivado" # required
[[rule]]
name = "dbg-core" # optional label
id = "Synth 8-7080"
regex = "u_dbg_.*"
file = "**/rtl/dbg/*.sv"
logs = ["build/top/pnr/job_3/vivado.log"]
severity = "warning"
max_count = 2
per = "log" # log | target; needs max_count
comment = "Debug core only in job 3; remove after 2027-01"
author = "jane@example.com"
date = "2026-11-07"
Key |
Type |
Notes |
|---|---|---|
|
string |
Required |
|
string |
Exact message ID |
|
string |
Python regex, |
|
glob |
Message file reference |
|
list of globs |
Relative to the project root |
|
string |
Severity id, case-insensitive |
|
integer >= 1 |
Default unlimited |
|
string |
|
|
string |
Required, non-empty |
|
string |
Optional |
|
string |
Optional |
|
string |
Optional |
Each rule needs at least one of id, regex or file.
JSON report¶
Written by sawmill report (default format) and sawmill check
--report PATH.
{
"generated": "2026-11-07T10:15:00.000000+00:00",
"sawmill_version": "0.5.0",
"passed": false,
"targets": [
{
"manifest": "soc",
"name": "pnr",
"plugin": "vivado",
"fail_on": "critical_warning",
"fail_on_level": 2,
"vars": {"build": "top"},
"passed": false,
"no_logs": false,
"counts": {"error": 0, "critical_warning": 1, "warning": 7, "info": 120, "other": 0},
"waived": 5,
"unwaived": 123,
"logs": [
{
"path": "build/top/pnr/job_3/vivado.log",
"passed": false,
"counts": {"error": 0, "critical_warning": 1, "warning": 7, "info": 120, "other": 0},
"waived": 5,
"unwaived": 123,
"failures": [
{
"message_id": "Timing 38-282",
"severity": "critical_warning",
"line": 4120,
"content": "The design failed to meet the timing requirements."
}
],
"waived_messages": [
{
"message_id": "Synth 8-7080",
"severity": "warning",
"line": 912,
"rule": "vivado-pnr.toml#1"
}
]
}
],
"rules_used": [
{
"file": "/work/soc/.sawmill/rules/vivado-pnr.toml",
"index": 0,
"name": null,
"display": "vivado-pnr.toml#1",
"id": "Synth 8-7080",
"regex": "u_dbg_.*",
"file_glob": null,
"logs": ["build/top/pnr/job_3/vivado.log"],
"severity": null,
"max_count": 2,
"per": "log",
"comment": "Debug core only present in job 3",
"matches": 2
}
],
"rules_unused": [],
"overflows": [
{
"rule": {"display": "vivado-pnr.toml#1", "...": "rule_ref fields"},
"scope": "build/top/pnr/job_3/vivado.log",
"count": 3,
"max_count": 2
}
]
}
],
"rules_unused": []
}
Top level:
Field |
Meaning |
|---|---|
|
ISO 8601 UTC timestamp |
|
Version that wrote the report |
|
True when every target passed |
|
One entry per selected target, in run order |
|
Rules ( |
Target:
Field |
Meaning |
|---|---|
|
Manifest name |
|
Target name |
|
Plugin name |
|
Effective severity id |
|
Its numeric level |
|
Resolved manifest variables, name to value; |
|
No failing log and at least one log |
|
True when the globs matched nothing |
|
Severity id to count, most severe first, then |
|
Waived messages |
|
Unwaived messages |
|
One entry per log |
|
|
|
|
|
|
Log: path (relative to the project root), passed, counts,
waived, unwaived, failures (message_id, severity,
line, content) and waived_messages (message_id,
severity, line, rule display name).
rule_ref:
Field |
Meaning |
|---|---|
|
Rule file path |
|
0-based position in the file |
|
Rule |
|
|
|
Match keys as written, null when absent |
|
|
|
The rule’s |
|
|
|
|
|
Limit, or null |
|
|
|
Rule comment |
|
Messages matched in this target |
JUnit XML¶
sawmill report --format junit renders the same data:
<?xml version='1.0' encoding='UTF-8'?>
<testsuites name="sawmill" tests="8" failures="1" errors="0" time="0">
<testsuite name="soc:pnr" timestamp="2026-11-07T10:15:00+00:00" tests="8" failures="1" errors="0">
<properties>
<property name="counts.error" value="0" />
<property name="counts.critical_warning" value="1" />
<property name="waived" value="5" />
<property name="unwaived" value="123" />
<property name="fail_on" value="critical_warning" />
<property name="vars.build" value="top" />
<property name="plugin" value="vivado" />
</properties>
<testcase classname="soc:pnr" name="build/top/pnr/job_0/vivado.log" />
<testcase classname="soc:pnr" name="build/top/pnr/job_3/vivado.log">
<failure message="1 unwaived messages at or above critical_warning" type="failure">critical_warning [Timing 38-282] The design failed to meet the timing requirements.</failure>
</testcase>
</testsuite>
</testsuites>
One
<testsuite>per target, namedmanifest:target.One
<testcase>per log, named by its path. A failing log has a<failure>with one line per failing message.A target with no logs has one failing
(no logs)test case.Properties:
counts.<severity>for each severity andother,waived,unwaived,fail_on,vars.<name>for each resolved variable,plugin, andrules_unused(comma-separated display names) when non-empty.
User config.toml¶
Location: ~/.config/sawmill/config.toml. Optional. Relative roots resolve
against the current directory; ~ is not expanded. There is no
project-level config file; project settings live in the manifest.
[general]
roots = ["/home/jane/work/fpga", "/proj/asic"] # manifest search roots
[output]
color = true
format = "text"
Key |
Default |
Notes |
|---|---|---|
|
|
Manifest search roots, used when neither |
|
none |
Parsed but unused; reserved |
|
|
Parsed but unused; reserved |
|
|
Parsed but unused; reserved |