treefmt configuration¶
This page enumerates the formatters wired into treefmt. The formatter
set comes from treefmt.nix, as do the file patterns of the formatters
that declare includes there — declaring them replaces the module
default rather than adding to it. A formatter that declares none takes
treefmt-nix's patterns. The global excludes below are the evaluated
set, which adds treefmt-nix's own defaults to the repo's. It is
auto-regenerated by scripts/refresh-treefmt-config.sh (run via
just show-treefmt), and also by update-flake-lock and
renovate-flake-lock-refresh whenever flake.lock changes — this page
is one of the lock-derived documents those workflows regenerate and
commit. Do not edit the block between the markers by hand.
| Formatter | Includes | Excludes |
|---|---|---|
just |
[Jj][Uu][Ss][Tt][Ff][Ii][Ll][Ee] */[Jj][Uu][Ss][Tt][Ff][Ii][Ll][Ee] .[Jj][Uu][Ss][Tt][Ff][Ii][Ll][Ee] */.[Jj][Uu][Ss][Tt][Ff][Ii][Ll][Ee] *.[Jj][Uu][Ss][Tt] *.[Jj][Uu][Ss][Tt][Ff][Ii][Ll][Ee] |
— |
mdformat |
*.md |
— |
nixfmt |
*.nix |
— |
prettier |
*.json *.yml *.yaml |
— |
shfmt |
*.sh *.bash *.envrc *.envrc.* .envrc |
— |
taplo |
*.toml |
— |
Global excludes¶
Patterns excluded from every formatter:
*.lock
*.patch
.editorconfig
.gitattributes
.gitignore
.gitmodules
.hgignore
.svnignore
CHANGELOG.md
LICENSE
docs/_data/dashboard.yml
docs/dashboard.md
docs/releases.md
docs/security/trust-model.md
go.mod
go.sum
package-lock.json
tests/fixtures/auto-merge-decline-gate/bad-malformed.yml
tests/fixtures/check-renovate-config-validator/bad-syntax.json
tests/fixtures/checkout-persist-credentials/bad-malformed.yml
tests/fixtures/ci-job-in-summary/bad-malformed-categories/categories.yml
tests/fixtures/ci-job-in-summary/bad-malformed-ci/ci.yml
tests/fixtures/ci-job-in-summary/bad-malformed-manifest/lint-groups.yml
tests/fixtures/commitlint-config-explicit/bad-malformed/ci.yml
tests/fixtures/egress-allowlist/bad-malformed.yml
tests/fixtures/fork-guard-release/bad-malformed.yml
tests/fixtures/gh-attestation-repo/bad-background-sep.sh
tests/fixtures/gh-attestation-repo/bad-doubled-space.sh
tests/fixtures/gh-attestation-repo/bad-doubled-span.md
tests/fixtures/gh-attestation-repo/bad-indented-code.md
tests/fixtures/gh-attestation-repo/bad-inline-triple.md
tests/fixtures/gh-attestation-repo/bad-multiline-span.md
tests/fixtures/gh-attestation-repo/bad-run-single-quoted.yml
tests/fixtures/gh-attestation-repo/bad-separator-pin.sh
tests/fixtures/gh-attestation-repo/bad-tilde-fence.md
tests/fixtures/gh-attestation-repo/good-indented-comment.md
tests/fixtures/gh-attestation-repo/good-odd-backtick.md
tests/fixtures/gh-attestation-repo/good-redir-pin.sh
tests/fixtures/harden-runner-first/bad-malformed.yml
tests/fixtures/job-timeout-minutes/bad-malformed.yml
tests/fixtures/permission-scopes/bad-malformed.yml
tests/fixtures/permission-scopes/malformed-allowlist/allowlist.yml
tests/fixtures/pr-workflows-no-secrets/bad-malformed.yml
tests/fixtures/renovate-invariants/bad-empty-payload.json
tests/fixtures/renovate-invariants/bad-not-json.json
tests/fixtures/renovate-markers/bad-empty-payload/renovate.json
tests/fixtures/renovate-markers/bad-not-json/renovate.json
tests/fixtures/required-checks/*
tests/fixtures/run-block-strict/bad-malformed.yml
tests/fixtures/scorecard-threshold/malformed.json
tests/fixtures/setup-nix-required/bad-malformed.yml
tests/fixtures/upload-artifact-strict/bad-malformed.yml
tests/fixtures/verify-reason-ladder/malformed/bad-malformed.yml