Use this page to see which config file each tool reads and to set up dx.toml, security.toml and license.toml.
All three files live in the workspace root, the directory that holds MODULE.bazel. All three are optional. An unknown key fails the run. Dates are YYYY-MM-DD. In an [[exception]], [[uncovered]] or [[inventory]] entry, every key whose default is none is required.
<tool> is a tool id, such as ruff or hlint. A tool’s root file is its config file in the workspace root, such as ruff.toml. The base is the file dx renders for it, such as .dx/config/ruff/base.toml.
Prints every file the tool reads, in order: the root file when there is one, then the base. Works for any tool with a base.
dx config diff <tool>
Prints a unified diff from the base to the root file. The dx: override of base header line is ignored. Prints nothing when the copy is unchanged.
dx config override <tool>
Copies the base to the tool’s root file and adds a dx: override of base <sha> comment on top. <sha> is the git blob sha of the base. This is the only form that writes.
dx config override <tool> refuses when:
the tool can extend its base. dx prints the line to add to your root file instead.
Picks the tier, the tools of each language family, and what dx leaves out.
With no dx.toml, every family found in the tree runs its curated tools at the strict tier. Set tier = "standard" to opt down. dx writes the .dx/ directory from this file. Never edit .dx/ by hand.
Start the file with the #:schema line below. An editor with a TOML schema plugin then completes every family and tool id. The schema is dx.schema.json.
Replaces the curated tools of one family. A capability you leave out keeps the curated tools. The curated tools are listed in Default tools.
Key
Type
Default
Meaning
tier
string
top-level tier
standard or strict for this family.
lint
array of strings
curated
Tool ids that lint the family.
format
array of strings
curated
Tool ids that format the family.
typecheck
array of strings
curated
Tool ids that typecheck the family.
audit
array of strings
curated
Tool ids that audit the family, for dx security and dx license. Their policy lives in security.toml and license.toml.
disabled
boolean
false
Turns the whole family off.
A plain list replaces the curated tools: lint = ["clippy"]. A list whose entries all start with + or - edits the curated tools instead, so tools added to the curated set later still reach you: lint = ["+yamllint", "-typos"]. Mixing the two forms fails the run. An unknown tool id fails the run.
Bazel label patterns dx leaves out. A target is one thing Bazel builds, and a label names it, such as //app:server. //third_party/... means every target under third_party/.
The branch, such as "origin/develop", whose merge base with HEAD--affected diffs from. Left out, dx uses origin/HEAD, else main or master. A base given on the command line overrides it, see Scope defaults.
whole_repo_tests
string
off
A test target, such as "//:smoke", that --affected runs instead of every test when the changes select //.... dx test and dx coverage run only it, and dx coverage checks no [coverage] minimum. The test phase of dx check runs only it and the coverage phase is skipped. dx build only analyzes //.... See Scope defaults.
dx coverage and the coverage phase of dx check --coverage both apply these minimums. A minimum left out is not checked. See Build, test, and coverage.
Key
Type
Default
Meaning
min
integer
off
Whole percent, 0 to 100, of the eligible lines of the production sources in scope. Below it the run exits 1.
min_changed_lines
integer
off
Whole percent, 0 to 100, of the executable lines added since the base --affected uses: --since, else the merge base with --base, [affected] base, or the default branch. Below it the run exits 1. It needs that base in the Git history.
Advisory kinds that fail the run: vulnerability, unsound, unmaintained, notice, yanked. Other kinds are reported as info. standard fails on vulnerability and unsound. strict adds unmaintained, notice and yanked. A list set here replaces the tier’s.
set = "oci" covers a finding from the oci_deploy image scan. package is the image package. versions is * or a range that holds the installed version.
set = "trivy_config" covers a trivy_config lint finding. advisory is the trivy ID, such as DS-0002. package is the workspace-relative file, or * for every file. versions must be *. dx lint drops covered findings until expires.
set = "trivy_image_config" covers a trivy_image_config lint finding. package is the workspace-relative BUILD.bazel of the image, or *. The other fields work as for trivy_config.
Workspace-relative path of a vendored license file. Implies text_present. The release NOTICE uses this file for cargo crates that ship no license text.