Running phase: unpackPhase unpacking source archive /nix/store/0yjjhdl8lngc55a0rpcd6hbhzzggf6n9-source source root is source Running phase: patchPhase Running phase: updateAutotoolsGnuConfigScriptsPhase Running phase: configurePhase Running phase: buildPhase github.com/numtide/treefmt/v2 coverage: 0.0% of statements ? github.com/numtide/treefmt/v2/build [no test files] === RUN TestOnUnmatched === RUN TestOnUnmatched/default root_test.go:79: treefmt -v === NAME TestOnUnmatched root_test.go:73: Error Trace: /build/source/cmd/root_test.go:73 /build/source/cmd/root_test.go:2892 /build/source/cmd/root_test.go:79 Error: Not equal: expected: []string{".gitignore", "go/go.mod", "haskell/haskell.cabal", "haskell-frontend/haskell-frontend.cabal", "html/scripts/.gitkeep", "python/requirements.txt"} actual : []string(nil) Diff: --- Expected +++ Actual @@ -1,9 +1,2 @@ -([]string) (len=6) { - (string) (len=10) ".gitignore", - (string) (len=9) "go/go.mod", - (string) (len=21) "haskell/haskell.cabal", - (string) (len=39) "haskell-frontend/haskell-frontend.cabal", - (string) (len=21) "html/scripts/.gitkeep", - (string) (len=23) "python/requirements.txt" -} +([]string) Test: TestOnUnmatched === NAME TestOnUnmatched/default testing.go:1913: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test --- FAIL: TestOnUnmatched (1.85s) --- FAIL: TestOnUnmatched/default (0.83s) === RUN TestQuiet root_test.go:149: treefmt -q root_test.go:149: root_test.go:149: root_test.go:150: treefmt --quiet root_test.go:150: root_test.go:150: root_test.go:153: treefmt root_test.go:153: root_test.go:153: root_test.go:158: treefmt root_test.go:158: Error: failed to create composite formatter: failed to initialise formatter foo-fmt: formatter command not found in PATH: error looking up 'foo-fmt' root_test.go:158: --- PASS: TestQuiet (1.63s) === RUN TestCpuProfile root_test.go:172: treefmt --cpu-profile cpu.pprof root_test.go:172: traversed 34 files emitted 22 files for processing formatted 22 files (4 changed) in 296ms root_test.go:172: root_test.go:182: treefmt root_test.go:182: traversed 35 files emitted 22 files for processing formatted 0 files (0 changed) in 38ms root_test.go:182: --- PASS: TestCpuProfile (1.35s) === RUN TestAllowMissingFormatter === RUN TestAllowMissingFormatter/default root_test.go:202: treefmt root_test.go:202: Error: failed to create composite formatter: failed to initialise formatter foo-fmt: formatter command not found in PATH: error looking up 'foo-fmt' root_test.go:202: === RUN TestAllowMissingFormatter/arg root_test.go:210: treefmt --allow-missing-formatter root_test.go:210: traversed 33 files emitted 0 files for processing formatted 0 files (0 changed) in 28ms root_test.go:210: === RUN TestAllowMissingFormatter/env root_test.go:224: treefmt root_test.go:224: traversed 33 files emitted 0 files for processing formatted 0 files (0 changed) in 24ms root_test.go:224: --- PASS: TestAllowMissingFormatter (1.08s) --- PASS: TestAllowMissingFormatter/default (0.02s) --- PASS: TestAllowMissingFormatter/arg (0.03s) --- PASS: TestAllowMissingFormatter/env (0.02s) === RUN TestSpecifyingFormatters === RUN TestSpecifyingFormatters/default root_test.go:257: treefmt root_test.go:257: traversed 33 files emitted 3 files for processing formatted 3 files (3 changed) in 34ms root_test.go:257: === RUN TestSpecifyingFormatters/args root_test.go:270: treefmt --formatters rust,nix root_test.go:270: traversed 33 files emitted 2 files for processing formatted 2 files (2 changed) in 28ms root_test.go:270: root_test.go:282: treefmt --formatters ruby,nix root_test.go:282: traversed 33 files emitted 2 files for processing formatted 2 files (2 changed) in 24ms root_test.go:282: root_test.go:294: treefmt --formatters nix root_test.go:294: traversed 33 files emitted 1 files for processing formatted 1 files (1 changed) in 24ms root_test.go:294: root_test.go:307: treefmt --formatters foo root_test.go:307: Error: failed to load config: formatter foo not found in config root_test.go:307: === RUN TestSpecifyingFormatters/env root_test.go:318: treefmt root_test.go:318: traversed 33 files emitted 2 files for processing formatted 2 files (2 changed) in 28ms root_test.go:318: root_test.go:331: treefmt root_test.go:331: Error: failed to load config: formatter bar not found in config root_test.go:331: === RUN TestSpecifyingFormatters/bad_names root_test.go:340: treefmt --formatters foo$ root_test.go:340: Error: failed to load config: formatter name "foo$" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:340: root_test.go:349: treefmt root_test.go:349: Error: failed to load config: formatter name "foo$" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:349: root_test.go:364: treefmt root_test.go:364: Error: failed to load config: formatter name "foo$" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:364: root_test.go:340: treefmt --formatters /bar root_test.go:340: Error: failed to load config: formatter name "/bar" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:340: root_test.go:349: treefmt root_test.go:349: Error: failed to load config: formatter name "/bar" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:349: root_test.go:364: treefmt root_test.go:364: Error: failed to load config: formatter name "/bar" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:364: root_test.go:340: treefmt --formatters baz% root_test.go:340: Error: failed to load config: formatter name "baz%" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:340: root_test.go:349: treefmt root_test.go:349: Error: failed to load config: formatter name "baz%" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:349: root_test.go:364: treefmt root_test.go:364: Error: failed to load config: formatter name "baz%" is invalid, must be of the form ^[a-zA-Z0-9_-]+$ root_test.go:364: --- PASS: TestSpecifyingFormatters (1.28s) --- PASS: TestSpecifyingFormatters/default (0.04s) --- PASS: TestSpecifyingFormatters/args (0.09s) --- PASS: TestSpecifyingFormatters/env (0.04s) --- PASS: TestSpecifyingFormatters/bad_names (0.10s) === RUN TestIncludesAndExcludes root_test.go:393: treefmt root_test.go:393: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 31ms root_test.go:393: root_test.go:407: treefmt -c root_test.go:407: traversed 33 files emitted 32 files for processing formatted 32 files (0 changed) in 30ms root_test.go:407: root_test.go:422: treefmt -c root_test.go:422: traversed 33 files emitted 26 files for processing formatted 26 files (0 changed) in 29ms root_test.go:422: root_test.go:439: treefmt -c root_test.go:439: traversed 33 files emitted 24 files for processing formatted 24 files (0 changed) in 28ms root_test.go:439: root_test.go:454: treefmt -c root_test.go:454: traversed 33 files emitted 23 files for processing formatted 23 files (0 changed) in 26ms root_test.go:454: root_test.go:471: treefmt -c root_test.go:471: traversed 33 files emitted 1 files for processing formatted 1 files (0 changed) in 31ms root_test.go:471: root_test.go:486: treefmt -c root_test.go:486: traversed 33 files emitted 2 files for processing formatted 2 files (0 changed) in 27ms root_test.go:486: --- PASS: TestIncludesAndExcludes (1.21s) === RUN TestConfigFile === RUN TestConfigFile/treefmt.toml root_test.go:514: treefmt --config-file /build/TestConfigFiletreefmt.toml857904224/003/treefmt.toml root_test.go:514: traversed 1 files emitted 1 files for processing formatted 1 files (0 changed) in 38ms root_test.go:514: root_test.go:533: treefmt --config-file /build/TestConfigFiletreefmt.toml857904224/003/treefmt.toml --tree-root /build/TestConfigFiletreefmt.toml857904224/001 root_test.go:533: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 23ms root_test.go:533: root_test.go:545: setting env TREEFMT_CONFIG=/build/TestConfigFiletreefmt.toml857904224/003/treefmt.toml root_test.go:545: setting env PRJ_ROOT=/build/TestConfigFiletreefmt.toml857904224/001 root_test.go:545: treefmt root_test.go:545: traversed 1 files emitted 1 files for processing formatted 0 files (0 changed) in 32ms root_test.go:545: root_test.go:561: setting env PRJ_ROOT=/build/TestConfigFiletreefmt.toml857904224/003 root_test.go:561: treefmt --tree-root /build/TestConfigFiletreefmt.toml857904224/001 root_test.go:561: traversed 33 files emitted 33 files for processing formatted 0 files (0 changed) in 19ms root_test.go:561: root_test.go:579: setting env PRJ_ROOT=/build/TestConfigFiletreefmt.toml857904224/003/sub root_test.go:579: treefmt --tree-root /build/TestConfigFiletreefmt.toml857904224/001 root_test.go:579: Error: failed to find treefmt config file: could not find [treefmt.toml .treefmt.toml .config/treefmt.toml] in /build/TestConfigFiletreefmt.toml857904224/002 root_test.go:579: === RUN TestConfigFile/.treefmt.toml root_test.go:514: treefmt --config-file /build/TestConfigFile.treefmt.toml674418827/003/.treefmt.toml root_test.go:514: traversed 1 files emitted 1 files for processing formatted 1 files (0 changed) in 38ms root_test.go:514: root_test.go:533: treefmt --config-file /build/TestConfigFile.treefmt.toml674418827/003/.treefmt.toml --tree-root /build/TestConfigFile.treefmt.toml674418827/001 root_test.go:533: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 23ms root_test.go:533: root_test.go:545: setting env TREEFMT_CONFIG=/build/TestConfigFile.treefmt.toml674418827/003/.treefmt.toml root_test.go:545: setting env PRJ_ROOT=/build/TestConfigFile.treefmt.toml674418827/001 root_test.go:545: treefmt root_test.go:545: traversed 1 files emitted 1 files for processing formatted 0 files (0 changed) in 22ms root_test.go:545: root_test.go:561: setting env PRJ_ROOT=/build/TestConfigFile.treefmt.toml674418827/003 root_test.go:561: treefmt --tree-root /build/TestConfigFile.treefmt.toml674418827/001 root_test.go:561: traversed 33 files emitted 33 files for processing formatted 0 files (0 changed) in 18ms root_test.go:561: root_test.go:579: setting env PRJ_ROOT=/build/TestConfigFile.treefmt.toml674418827/003/sub root_test.go:579: treefmt --tree-root /build/TestConfigFile.treefmt.toml674418827/001 root_test.go:579: Error: failed to find treefmt config file: could not find [treefmt.toml .treefmt.toml .config/treefmt.toml] in /build/TestConfigFile.treefmt.toml674418827/002 root_test.go:579: --- PASS: TestConfigFile (2.23s) --- PASS: TestConfigFile/treefmt.toml (1.12s) --- PASS: TestConfigFile/.treefmt.toml (1.11s) === RUN TestDotConfigDir === RUN TestDotConfigDir/basic root_test.go:607: treefmt root_test.go:607: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 35ms root_test.go:607: === RUN TestDotConfigDir/project_root_ending_in_.config root_test.go:644: treefmt root_test.go:644: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 39ms root_test.go:644: --- PASS: TestDotConfigDir (2.09s) --- PASS: TestDotConfigDir/basic (1.04s) --- PASS: TestDotConfigDir/project_root_ending_in_.config (1.05s) === RUN TestCache root_test.go:684: treefmt root_test.go:684: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 45ms root_test.go:684: root_test.go:695: treefmt root_test.go:695: traversed 33 files emitted 33 files for processing formatted 0 files (0 changed) in 27ms root_test.go:695: root_test.go:706: treefmt -c root_test.go:706: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 30ms root_test.go:706: root_test.go:718: treefmt root_test.go:718: traversed 33 files emitted 33 files for processing formatted 0 files (0 changed) in 26ms root_test.go:718: root_test.go:729: treefmt root_test.go:729: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 33ms root_test.go:729: root_test.go:741: treefmt --no-cache root_test.go:741: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 32ms root_test.go:741: root_test.go:769: treefmt root_test.go:769: ERROR formatter | fail: failed to apply with options '[--bad-arg haskell/Foo.hs haskell/Main.hs haskell/Nested/Foo.hs haskell/Setup.hs haskell-frontend/Main.hs haskell-frontend/Setup.hs]': exit status 1 /nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin/touch: unrecognized option '--bad-arg' Try '/nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin/touch --help' for more information. traversed 33 files emitted 6 files for processing formatted 0 files (0 changed) in 28ms Error: failed to finalise formatting: formatting failures detected root_test.go:769: root_test.go:782: treefmt root_test.go:782: ERROR formatter | fail: failed to apply with options '[--bad-arg haskell/Foo.hs haskell/Main.hs haskell/Nested/Foo.hs haskell/Setup.hs haskell-frontend/Main.hs haskell-frontend/Setup.hs]': exit status 1 /nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin/touch: unrecognized option '--bad-arg' Try '/nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin/touch --help' for more information. traversed 33 files emitted 6 files for processing formatted 0 files (0 changed) in 31ms Error: failed to finalise formatting: formatting failures detected root_test.go:782: root_test.go:804: treefmt root_test.go:804: traversed 33 files emitted 6 files for processing formatted 6 files (6 changed) in 32ms root_test.go:804: --- PASS: TestCache (1.30s) === RUN TestChangeWorkingDirectory === RUN TestChangeWorkingDirectory/default root_test.go:846: treefmt root_test.go:846: Error: failed to find treefmt config file: could not find [treefmt.toml .treefmt.toml .config/treefmt.toml] in /build/TestChangeWorkingDirectorydefault701481284/002 root_test.go:846: root_test.go:857: treefmt root_test.go:857: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 44ms root_test.go:857: === RUN TestChangeWorkingDirectory/arg === RUN TestChangeWorkingDirectory/arg/treefmt.toml root_test.go:893: treefmt -C /build/TestChangeWorkingDirectoryargtreefmt.toml1705709787/001 root_test.go:893: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 55ms root_test.go:893: === RUN TestChangeWorkingDirectory/arg/.treefmt.toml root_test.go:893: treefmt -C /build/TestChangeWorkingDirectoryarg.treefmt.toml982174704/001 root_test.go:893: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 48ms root_test.go:893: === RUN TestChangeWorkingDirectory/env === RUN TestChangeWorkingDirectory/env/treefmt.toml root_test.go:893: treefmt root_test.go:893: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 56ms root_test.go:893: === RUN TestChangeWorkingDirectory/env/.treefmt.toml root_test.go:893: treefmt root_test.go:893: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 56ms root_test.go:893: --- PASS: TestChangeWorkingDirectory (5.30s) --- PASS: TestChangeWorkingDirectory/default (1.05s) --- PASS: TestChangeWorkingDirectory/arg (2.12s) --- PASS: TestChangeWorkingDirectory/arg/treefmt.toml (1.06s) --- PASS: TestChangeWorkingDirectory/arg/.treefmt.toml (1.06s) --- PASS: TestChangeWorkingDirectory/env (2.13s) --- PASS: TestChangeWorkingDirectory/env/treefmt.toml (1.06s) --- PASS: TestChangeWorkingDirectory/env/.treefmt.toml (1.06s) === RUN TestFailOnChange === RUN TestFailOnChange/change_size root_test.go:941: treefmt --fail-on-change root_test.go:941: ERROR file has changed path=rust/Cargo.toml prev_size=233 prev_mod_time="2026-10-05 11:10:00 +0000 UTC" current_size=239 current_mod_time="2026-10-05 11:10:01 +0000 UTC" ERROR file has changed path=rust/src/main.rs prev_size=45 prev_mod_time="2026-10-05 11:10:00 +0000 UTC" current_size=51 current_mod_time="2026-10-05 11:10:01 +0000 UTC" traversed 33 files emitted 2 files for processing formatted 2 files (2 changed) in 47ms Error: unexpected changes detected, --fail-on-change is enabled root_test.go:941: root_test.go:957: treefmt --fail-on-change root_test.go:957: traversed 33 files emitted 2 files for processing formatted 0 files (0 changed) in 38ms root_test.go:957: === RUN TestFailOnChange/change_modtime root_test.go:985: treefmt --fail-on-change root_test.go:985: ERROR file has changed path=haskell/CHANGELOG.md prev_size=112 prev_mod_time="2026-10-05 11:10:01 +0000 UTC" current_size=112 current_mod_time="2026-10-05 11:10:03 +0000 UTC" ERROR file has changed path=haskell/Foo.hs prev_size=62 prev_mod_time="2026-10-05 11:10:01 +0000 UTC" current_size=62 current_mod_time="2026-10-05 11:10:03 +0000 UTC" ERROR file has changed path=haskell/Main.hs prev_size=65 prev_mod_time="2026-10-05 11:10:01 +0000 UTC" current_size=65 current_mod_time="2026-10-05 11:10:03 +0000 UTC" ERROR file has changed path=haskell/Nested/Foo.hs prev_size=69 prev_mod_time="2026-10-05 11:10:01 +0000 UTC" current_size=69 current_mod_time="2026-10-05 11:10:03 +0000 UTC" ERROR file has changed path=haskell/Setup.hs prev_size=47 prev_mod_time="2026-10-05 11:10:01 +0000 UTC" current_size=47 current_mod_time="2026-10-05 11:10:03 +0000 UTC" ERROR file has changed path=haskell/haskell.cabal prev_size=688 prev_mod_time="2026-10-05 11:10:01 +0000 UTC" current_size=688 current_mod_time="2026-10-05 11:10:03 +0000 UTC" ERROR file has changed path=haskell/treefmt.toml prev_size=238 prev_mod_time="2026-10-05 11:10:01 +0000 UTC" current_size=238 current_mod_time="2026-10-05 11:10:03 +0000 UTC" traversed 33 files emitted 7 files for processing formatted 7 files (7 changed) in 67ms Error: unexpected changes detected, --fail-on-change is enabled root_test.go:985: root_test.go:1018: treefmt --fail-on-change root_test.go:1018: traversed 33 files emitted 7 files for processing formatted 0 files (0 changed) in 36ms root_test.go:1018: --- PASS: TestFailOnChange (2.21s) --- PASS: TestFailOnChange/change_size (1.09s) --- PASS: TestFailOnChange/change_modtime (1.11s) === RUN TestCacheBusting === RUN TestCacheBusting/formatter_change_config root_test.go:1056: treefmt root_test.go:1056: traversed 33 files emitted 8 files for processing formatted 8 files (6 changed) in 48ms root_test.go:1056: root_test.go:1070: treefmt root_test.go:1070: traversed 33 files emitted 8 files for processing formatted 6 files (6 changed) in 44ms root_test.go:1070: root_test.go:1081: treefmt root_test.go:1081: traversed 33 files emitted 8 files for processing formatted 0 files (0 changed) in 38ms root_test.go:1081: root_test.go:1095: treefmt root_test.go:1095: traversed 33 files emitted 8 files for processing formatted 6 files (0 changed) in 38ms root_test.go:1095: root_test.go:1106: treefmt root_test.go:1106: traversed 33 files emitted 8 files for processing formatted 0 files (0 changed) in 39ms root_test.go:1106: root_test.go:1121: treefmt root_test.go:1121: traversed 33 files emitted 6 files for processing formatted 0 files (0 changed) in 34ms root_test.go:1121: root_test.go:1136: treefmt root_test.go:1136: traversed 33 files emitted 5 files for processing formatted 0 files (0 changed) in 35ms root_test.go:1136: === RUN TestCacheBusting/formatter_change_binary root_test.go:1183: treefmt root_test.go:1183: traversed 34 files emitted 3 files for processing formatted 3 files (1 changed) in 43ms root_test.go:1183: root_test.go:1198: treefmt root_test.go:1198: traversed 34 files emitted 3 files for processing formatted 1 files (1 changed) in 42ms root_test.go:1198: root_test.go:1209: treefmt root_test.go:1209: traversed 34 files emitted 3 files for processing formatted 0 files (0 changed) in 36ms root_test.go:1209: root_test.go:1229: treefmt root_test.go:1229: traversed 34 files emitted 3 files for processing formatted 1 files (1 changed) in 40ms root_test.go:1229: root_test.go:1240: treefmt root_test.go:1240: traversed 34 files emitted 3 files for processing formatted 0 files (0 changed) in 39ms root_test.go:1240: === RUN TestCacheBusting/formatter_add_remove root_test.go:1269: treefmt root_test.go:1269: traversed 33 files emitted 2 files for processing formatted 2 files (2 changed) in 40ms root_test.go:1269: root_test.go:1281: treefmt root_test.go:1281: traversed 33 files emitted 2 files for processing formatted 0 files (0 changed) in 31ms root_test.go:1281: root_test.go:1300: treefmt root_test.go:1300: traversed 33 files emitted 3 files for processing formatted 1 files (1 changed) in 36ms root_test.go:1300: root_test.go:1319: treefmt root_test.go:1319: traversed 33 files emitted 3 files for processing formatted 2 files (2 changed) in 31ms root_test.go:1319: root_test.go:1331: treefmt root_test.go:1331: traversed 33 files emitted 3 files for processing formatted 0 files (0 changed) in 25ms root_test.go:1331: root_test.go:1347: treefmt root_test.go:1347: traversed 33 files emitted 3 files for processing formatted 2 files (2 changed) in 34ms root_test.go:1347: root_test.go:1359: treefmt root_test.go:1359: traversed 33 files emitted 3 files for processing formatted 0 files (0 changed) in 34ms root_test.go:1359: root_test.go:1374: treefmt root_test.go:1374: traversed 33 files emitted 3 files for processing formatted 2 files (2 changed) in 30ms root_test.go:1374: root_test.go:1386: treefmt root_test.go:1386: traversed 33 files emitted 3 files for processing formatted 0 files (0 changed) in 29ms root_test.go:1386: root_test.go:1402: treefmt root_test.go:1402: traversed 33 files emitted 2 files for processing formatted 0 files (0 changed) in 32ms root_test.go:1402: --- PASS: TestCacheBusting (3.85s) --- PASS: TestCacheBusting/formatter_change_config (1.29s) --- PASS: TestCacheBusting/formatter_change_binary (1.22s) --- PASS: TestCacheBusting/formatter_add_remove (1.34s) === RUN TestGit root_test.go:1441: treefmt root_test.go:1441: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 16ms root_test.go:1441: root_test.go:1456: treefmt root_test.go:1456: traversed 33 files emitted 33 files for processing formatted 0 files (0 changed) in 11ms root_test.go:1456: root_test.go:1474: treefmt root_test.go:1474: traversed 33 files emitted 33 files for processing formatted 0 files (0 changed) in 11ms root_test.go:1474: root_test.go:1489: treefmt root_test.go:1489: WARN walk | git: Path /build/TestGit1068145078/001/python/main.py was emitted by git but no file exists at that path WARN walk | git: Path /build/TestGit1068145078/001/python/requirements.txt was emitted by git but no file exists at that path WARN walk | git: Path /build/TestGit1068145078/001/python/virtualenv_proxy.py was emitted by git but no file exists at that path traversed 30 files emitted 30 files for processing formatted 0 files (0 changed) in 11ms root_test.go:1489: root_test.go:1506: treefmt --walk filesystem root_test.go:1506: traversed 82 files emitted 82 files for processing formatted 53 files (0 changed) in 16ms root_test.go:1506: root_test.go:1521: treefmt go root_test.go:1521: traversed 2 files emitted 2 files for processing formatted 0 files (0 changed) in 8ms root_test.go:1521: root_test.go:1533: treefmt go haskell root_test.go:1533: traversed 9 files emitted 9 files for processing formatted 0 files (0 changed) in 8ms root_test.go:1533: root_test.go:1545: treefmt -C /build/TestGit1068145078/001 go haskell ruby root_test.go:1545: traversed 10 files emitted 10 files for processing formatted 0 files (0 changed) in 9ms root_test.go:1545: root_test.go:1558: treefmt -C /build/TestGit1068145078/001 haskell foo root_test.go:1558: Error: failed to create walker: path /build/TestGit1068145078/001/foo not found: lstat /build/TestGit1068145078/001/foo: no such file or directory root_test.go:1558: root_test.go:1570: treefmt haskell foo.txt -vv root_test.go:1570: INFO config: no tree root specified INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel DEBUG tree-root-cmd | stdout: /build/TestGit1068145078/001 INFO config: tree root: /build/TestGit1068145078/001 DEBUG Resolving path '/build/TestGit1068145078/001' DEBUG Resolving path 'haskell' DEBUG Resolving path 'haskell' DEBUG Resolving path 'foo.txt' DEBUG Resolving path 'foo.txt' DEBUG walk | git: processing file: /build/TestGit1068145078/001/foo.txt DEBUG walk | git: processing file: /build/TestGit1068145078/001/haskell/CHANGELOG.md DEBUG walk | git: processing file: /build/TestGit1068145078/001/haskell/Foo.hs DEBUG walk | git: processing file: /build/TestGit1068145078/001/haskell/Main.hs DEBUG walk | git: processing file: /build/TestGit1068145078/001/haskell/Nested/Foo.hs DEBUG walk | git: processing file: /build/TestGit1068145078/001/haskell/Setup.hs DEBUG walk | git: processing file: /build/TestGit1068145078/001/haskell/haskell.cabal DEBUG walk | git: processing file: /build/TestGit1068145078/001/haskell/treefmt.toml DEBUG walk | cache: read 8 files from delegate DEBUG read 8 files DEBUG formatter | echo: match: /build/TestGit1068145078/001/foo.txt DEBUG formatters signature for key echo: 72b64df76371f817db42b84ad3fc729f DEBUG formatter | echo: match: /build/TestGit1068145078/001/haskell/CHANGELOG.md DEBUG formatter | echo: match: /build/TestGit1068145078/001/haskell/Foo.hs DEBUG formatter | echo: match: /build/TestGit1068145078/001/haskell/Main.hs DEBUG formatter | echo: match: /build/TestGit1068145078/001/haskell/Nested/Foo.hs DEBUG formatter | echo: match: /build/TestGit1068145078/001/haskell/Setup.hs DEBUG formatter | echo: match: /build/TestGit1068145078/001/haskell/haskell.cabal DEBUG formatter | echo: match: /build/TestGit1068145078/001/haskell/treefmt.toml DEBUG formatter | echo: executing: /nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin/echo foo.txt INFO formatter | echo: 1 file(s) processed in 1.245485ms traversed 8 files emitted 8 files for processing formatted 1 files (0 changed) in 19ms DEBUG no more files to read root_test.go:1570: root_test.go:1582: treefmt go foo.txt root_test.go:1582: traversed 3 files emitted 3 files for processing formatted 0 files (0 changed) in 11ms root_test.go:1582: root_test.go:1594: treefmt foo.txt root_test.go:1594: traversed 1 files emitted 1 files for processing formatted 0 files (0 changed) in 9ms root_test.go:1594: --- PASS: TestGit (1.17s) === RUN TestJujutsu root_test.go:1638: treefmt root_test.go:1638: traversed 0 files emitted 0 files for processing formatted 0 files (0 changed) in 40ms root_test.go:1638: root_test.go:1654: treefmt root_test.go:1654: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 47ms root_test.go:1654: root_test.go:1677: treefmt root_test.go:1677: traversed 33 files emitted 33 files for processing formatted 0 files (0 changed) in 36ms root_test.go:1677: root_test.go:1696: treefmt root_test.go:1696: traversed 30 files emitted 30 files for processing formatted 0 files (0 changed) in 39ms root_test.go:1696: root_test.go:1712: treefmt --walk filesystem root_test.go:1712: traversed 137 files emitted 137 files for processing formatted 108 files (0 changed) in 17ms root_test.go:1712: root_test.go:1727: treefmt go root_test.go:1727: traversed 2 files emitted 2 files for processing formatted 0 files (0 changed) in 40ms root_test.go:1727: root_test.go:1739: treefmt go haskell root_test.go:1739: traversed 9 files emitted 9 files for processing formatted 0 files (0 changed) in 40ms root_test.go:1739: root_test.go:1751: treefmt -C /build/TestJujutsu4069836021/001 go haskell ruby root_test.go:1751: traversed 10 files emitted 10 files for processing formatted 0 files (0 changed) in 42ms root_test.go:1751: root_test.go:1764: treefmt -C /build/TestJujutsu4069836021/001 haskell foo root_test.go:1764: Error: failed to create walker: path /build/TestJujutsu4069836021/001/foo not found: lstat /build/TestJujutsu4069836021/001/foo: no such file or directory root_test.go:1764: root_test.go:1780: treefmt haskell foo.txt -vv root_test.go:1780: INFO config: no tree root specified INFO config: attempting to resolve tree root using jujutsu: jj workspace root DEBUG tree-root-cmd | stdout: /build/TestJujutsu4069836021/001 INFO config: tree root: /build/TestJujutsu4069836021/001 DEBUG Resolving path '/build/TestJujutsu4069836021/001' DEBUG Resolving path 'haskell' DEBUG Resolving path 'haskell' DEBUG Resolving path 'foo.txt' DEBUG Resolving path 'foo.txt' DEBUG walk | jujutsu: processing file: /build/TestJujutsu4069836021/001/foo.txt DEBUG walk | jujutsu: processing file: /build/TestJujutsu4069836021/001/haskell/CHANGELOG.md DEBUG walk | jujutsu: processing file: /build/TestJujutsu4069836021/001/haskell/Foo.hs DEBUG walk | jujutsu: processing file: /build/TestJujutsu4069836021/001/haskell/Main.hs DEBUG walk | jujutsu: processing file: /build/TestJujutsu4069836021/001/haskell/Nested/Foo.hs DEBUG walk | jujutsu: processing file: /build/TestJujutsu4069836021/001/haskell/Setup.hs DEBUG walk | jujutsu: processing file: /build/TestJujutsu4069836021/001/haskell/haskell.cabal DEBUG walk | jujutsu: processing file: /build/TestJujutsu4069836021/001/haskell/treefmt.toml DEBUG walk | cache: read 8 files from delegate DEBUG read 8 files DEBUG formatter | echo: match: /build/TestJujutsu4069836021/001/foo.txt DEBUG formatters signature for key echo: 72b64df76371f817db42b84ad3fc729f DEBUG formatter | echo: match: /build/TestJujutsu4069836021/001/haskell/CHANGELOG.md DEBUG formatter | echo: match: /build/TestJujutsu4069836021/001/haskell/Foo.hs DEBUG formatter | echo: match: /build/TestJujutsu4069836021/001/haskell/Main.hs DEBUG formatter | echo: match: /build/TestJujutsu4069836021/001/haskell/Nested/Foo.hs DEBUG formatter | echo: match: /build/TestJujutsu4069836021/001/haskell/Setup.hs DEBUG formatter | echo: match: /build/TestJujutsu4069836021/001/haskell/haskell.cabal DEBUG formatter | echo: match: /build/TestJujutsu4069836021/001/haskell/treefmt.toml DEBUG formatter | echo: executing: /nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin/echo foo.txt INFO formatter | echo: 1 file(s) processed in 1.245748ms traversed 8 files emitted 8 files for processing formatted 1 files (0 changed) in 41ms DEBUG no more files to read root_test.go:1780: root_test.go:1792: treefmt go foo.txt root_test.go:1792: traversed 3 files emitted 3 files for processing formatted 0 files (0 changed) in 38ms root_test.go:1792: root_test.go:1804: treefmt foo.txt root_test.go:1804: traversed 1 files emitted 1 files for processing formatted 0 files (0 changed) in 40ms root_test.go:1804: --- PASS: TestJujutsu (1.62s) === RUN TestTreeRootCmd root_test.go:1850: treefmt -vv --tree-root-cmd bash -c '>&2 echo -e "some error text some more error text" && echo /build/TestTreeRootCmd2975785364/001' root_test.go:1845: Error Trace: /build/source/cmd/root_test.go:1845 /build/source/cmd/root_test.go:2892 /build/source/cmd/root_test.go:1850 Error: "INFO config: searching for tree root using tree-root-cmd: bash -c '>&2 echo -e \"some error text\nsome more error text\" && echo /build/TestTreeRootCmd2975785364/001'\nDEBUG tree-root-cmd | stdout: /build/TestTreeRootCmd2975785364/001\n\nDEBUG tree-root-cmd | stderr: some error text\nDEBUG tree-root-cmd | stderr: some more error text\nINFO config: tree root: /build/TestTreeRootCmd2975785364/001\nDEBUG Resolving path '/build/TestTreeRootCmd2975785364/001'\nDEBUG walk | filesystem: file queued .gitignore\nDEBUG walk | filesystem: file queued emoji 🕰️/README.md\nDEBUG walk | filesystem: file queued go/go.mod\nDEBUG walk | filesystem: file queued go/main.go\nDEBUG walk | filesystem: file queued haskell/CHANGELOG.md\nDEBUG walk | filesystem: file queued haskell/Foo.hs\nDEBUG walk | filesystem: file queued haskell/Main.hs\nDEBUG walk | filesystem: file queued haskell/Nested/Foo.hs\nDEBUG walk | filesystem: file queued haskell/Setup.hs\nDEBUG walk | filesystem: file queued haskell/haskell.cabal\nDEBUG walk | filesystem: file queued haskell/treefmt.toml\nDEBUG walk | filesystem: file queued haskell-frontend/CHANGELOG.md\nDEBUG walk | filesystem: file queued haskell-frontend/Main.hs\nDEBUG walk | filesystem: file queued haskell-frontend/Setup.hs\nDEBUG walk | filesystem: file queued haskell-frontend/haskell-frontend.cabal\nDEBUG walk | filesystem: file queued html/index.html\nDEBUG walk | filesystem: file queued html/scripts/.gitkeep\nDEBUG walk | filesystem: file queued javascript/source/hello.js\nDEBUG walk | filesystem: file queued just/justfile\nDEBUG walk | filesystem: file queued nix/sources.nix\nDEBUG walk | filesystem: file queued nixpkgs.toml\nDEBUG walk | filesystem: file queued python/main.py\nDEBUG walk | filesystem: file queued python/requirements.txt\nDEBUG walk | filesystem: file queued python/virtualenv_proxy.py\nDEBUG walk | filesystem: file queued ruby/bundler.rb\nDEBUG walk | filesystem: file queued rust/Cargo.toml\nDEBUG walk | filesystem: file queued rust/src/main.rs\nDEBUG walk | filesystem: file queued shell/foo.sh\nDEBUG walk | filesystem: file queued terraform/main.tf\nDEBUG walk | filesystem: file queued terraform/two.tf\nDEBUG walk | filesystem: file queued touch.toml\nDEBUG walk | filesystem: file queued treefmt.toml\nDEBUG walk | filesystem: file queued yaml/test.yaml\nDEBUG walk | cache: read 33 files from delegate\nDEBUG read 33 files\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/.gitignore\nDEBUG formatters signature for key echo: 72b64df76371f817db42b84ad3fc729f\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/emoji 🕰️/README.md\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/go/go.mod\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/go/main.go\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell/CHANGELOG.md\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell/Foo.hs\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell/Main.hs\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell/Nested/Foo.hs\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell/Setup.hs\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell/haskell.cabal\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell/treefmt.toml\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell-frontend/CHANGELOG.md\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell-frontend/Main.hs\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell-frontend/Setup.hs\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/haskell-frontend/haskell-frontend.cabal\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/html/index.html\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/html/scripts/.gitkeep\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/javascript/source/hello.js\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/just/justfile\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/nix/sources.nix\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/nixpkgs.toml\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/python/main.py\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/python/requirements.txt\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/python/virtualenv_proxy.py\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/ruby/bundler.rb\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/rust/Cargo.toml\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/rust/src/main.rs\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/shell/foo.sh\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/terraform/main.tf\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/terraform/two.tf\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/touch.toml\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/treefmt.toml\nDEBUG formatter | echo: match: /build/TestTreeRootCmd2975785364/001/yaml/test.yaml\nDEBUG formatter | echo: executing: /nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin/echo .gitignore emoji 🕰️/README.md go/go.mod go/main.go haskell/CHANGELOG.md haskell/Foo.hs haskell/Main.hs haskell/Nested/Foo.hs haskell/Setup.hs haskell/haskell.cabal haskell/treefmt.toml haskell-frontend/CHANGELOG.md haskell-frontend/Main.hs haskell-frontend/Setup.hs haskell-frontend/haskell-frontend.cabal html/index.html html/scripts/.gitkeep javascript/source/hello.js just/justfile nix/sources.nix nixpkgs.toml python/main.py python/requirements.txt python/virtualenv_proxy.py ruby/bundler.rb rust/Cargo.toml rust/src/main.rs shell/foo.sh terraform/main.tf terraform/two.tf touch.toml treefmt.toml yaml/test.yaml\nINFO formatter | echo: 33 file(s) processed in 3.00915ms\ntraversed 33 files\nemitted 33 files for processing\nformatted 33 files (0 changed) in 55ms\nDEBUG no more files to read\n" does not contain "DEBU tree-root-cmd | stderr: some error text\n" Test: TestTreeRootCmd --- FAIL: TestTreeRootCmd (1.07s) === RUN TestTreeRootExclusivity root_test.go:1997: treefmt --tree-root bar --tree-root-cmd 'echo /foo/bar' root_test.go:1997: Error: if any flags in the group [tree-root tree-root-cmd tree-root-file] are set none of the others can be; [tree-root tree-root-cmd] were all set root_test.go:1997: Usage: treefmt [flags] Flags: --allow-missing-formatter Do not exit with error if a configured formatter is missing. (env $TREEFMT_ALLOW_MISSING_FORMATTER) --ci Runs treefmt in a CI mode, enabling --no-cache, --fail-on-change and adjusting some other settings best suited to a CI use case. (env $TREEFMT_CI) -c, --clear-cache Reset the evaluation cache. Use in case the cache is not precise enough. (env $TREEFMT_CLEAR_CACHE) --completion string [bash|zsh|fish] Generate shell completion scripts for the specified shell. --config-file string Load the config file from the given path (defaults to searching upwards for treefmt.toml or .treefmt.toml). --cpu-profile string The file into which a cpu profile will be written. (env $TREEFMT_CPU_PROFILE) --excludes strings Exclude files or directories matching the specified globs. (env $TREEFMT_EXCLUDES) --fail-on-change Exit with error if any changes were made. Useful for CI. (env $TREEFMT_FAIL_ON_CHANGE) -f, --formatters strings Specify formatters to apply. Defaults to all configured formatters. (env $TREEFMT_FORMATTERS) -h, --help help for treefmt -i, --init Create a treefmt.toml file in the current directory. --no-cache Ignore the evaluation cache entirely. Useful for CI. (env $TREEFMT_NO_CACHE) -u, --on-unmatched string Log paths that did not match any formatters at the specified log level. Possible values are . (env $TREEFMT_ON_UNMATCHED) (default "info") -q, --quiet Disable all logs except errors. (env $TREEFMT_QUIET) --stdin Format the context passed in via stdin. --tree-root string The root directory from which treefmt will start walking the filesystem. Defaults to the root of the current git or jujutsu worktree. If not in a git or jujutsu repo, defaults to the directory containing the config file. (env $TREEFMT_TREE_ROOT) --tree-root-cmd string Command to run to find the tree root. It is parsed using shlex, to allow quoting arguments that contain whitespace. If you wish to pass arguments containing quotes, you should use nested quotes e.g. "'" or '"'. (env $TREEFMT_TREE_ROOT_CMD) --tree-root-file string File to search for to find the tree root. (env $TREEFMT_TREE_ROOT_FILE) -v, --verbose count Set the verbosity of logs e.g. -vv. (env $TREEFMT_VERBOSE) --version version for treefmt --walk string The method used to traverse the files within the tree root. Currently supports . (env $TREEFMT_WALK) (default "auto") -C, --working-dir string Run as if treefmt was started in the specified working directory instead of the current working directory. (env $TREEFMT_WORKING_DIR) (default ".") root_test.go:2010: setting env TREEFMT_TREE_ROOT_CMD=echo /foo/bar root_test.go:2010: setting env TREEFMT_TREE_ROOT=bar root_test.go:2010: treefmt root_test.go:2010: Error: failed to load config: failed to determine tree root: at most one of tree-root, tree-root-cmd or tree-root-file can be specified root_test.go:2010: root_test.go:2025: treefmt root_test.go:2025: Error: failed to load config: failed to determine tree root: at most one of tree-root, tree-root-cmd or tree-root-file can be specified root_test.go:2025: root_test.go:1997: treefmt --tree-root bar --tree-root-file .git/config root_test.go:1997: Error: if any flags in the group [tree-root tree-root-cmd tree-root-file] are set none of the others can be; [tree-root tree-root-file] were all set root_test.go:1997: Usage: treefmt [flags] Flags: --allow-missing-formatter Do not exit with error if a configured formatter is missing. (env $TREEFMT_ALLOW_MISSING_FORMATTER) --ci Runs treefmt in a CI mode, enabling --no-cache, --fail-on-change and adjusting some other settings best suited to a CI use case. (env $TREEFMT_CI) -c, --clear-cache Reset the evaluation cache. Use in case the cache is not precise enough. (env $TREEFMT_CLEAR_CACHE) --completion string [bash|zsh|fish] Generate shell completion scripts for the specified shell. --config-file string Load the config file from the given path (defaults to searching upwards for treefmt.toml or .treefmt.toml). --cpu-profile string The file into which a cpu profile will be written. (env $TREEFMT_CPU_PROFILE) --excludes strings Exclude files or directories matching the specified globs. (env $TREEFMT_EXCLUDES) --fail-on-change Exit with error if any changes were made. Useful for CI. (env $TREEFMT_FAIL_ON_CHANGE) -f, --formatters strings Specify formatters to apply. Defaults to all configured formatters. (env $TREEFMT_FORMATTERS) -h, --help help for treefmt -i, --init Create a treefmt.toml file in the current directory. --no-cache Ignore the evaluation cache entirely. Useful for CI. (env $TREEFMT_NO_CACHE) -u, --on-unmatched string Log paths that did not match any formatters at the specified log level. Possible values are . (env $TREEFMT_ON_UNMATCHED) (default "info") -q, --quiet Disable all logs except errors. (env $TREEFMT_QUIET) --stdin Format the context passed in via stdin. --tree-root string The root directory from which treefmt will start walking the filesystem. Defaults to the root of the current git or jujutsu worktree. If not in a git or jujutsu repo, defaults to the directory containing the config file. (env $TREEFMT_TREE_ROOT) --tree-root-cmd string Command to run to find the tree root. It is parsed using shlex, to allow quoting arguments that contain whitespace. If you wish to pass arguments containing quotes, you should use nested quotes e.g. "'" or '"'. (env $TREEFMT_TREE_ROOT_CMD) --tree-root-file string File to search for to find the tree root. (env $TREEFMT_TREE_ROOT_FILE) -v, --verbose count Set the verbosity of logs e.g. -vv. (env $TREEFMT_VERBOSE) --version version for treefmt --walk string The method used to traverse the files within the tree root. Currently supports . (env $TREEFMT_WALK) (default "auto") -C, --working-dir string Run as if treefmt was started in the specified working directory instead of the current working directory. (env $TREEFMT_WORKING_DIR) (default ".") root_test.go:2010: setting env TREEFMT_TREE_ROOT=bar root_test.go:2010: setting env TREEFMT_TREE_ROOT_FILE=.git/config root_test.go:2010: treefmt root_test.go:2010: Error: failed to load config: failed to determine tree root: at most one of tree-root, tree-root-cmd or tree-root-file can be specified root_test.go:2010: root_test.go:2025: treefmt root_test.go:2025: Error: failed to load config: failed to determine tree root: at most one of tree-root, tree-root-cmd or tree-root-file can be specified root_test.go:2025: root_test.go:1997: treefmt --tree-root-cmd 'echo /foo/bar' --tree-root-file .git/config root_test.go:1997: Error: if any flags in the group [tree-root tree-root-cmd tree-root-file] are set none of the others can be; [tree-root-cmd tree-root-file] were all set root_test.go:1997: Usage: treefmt [flags] Flags: --allow-missing-formatter Do not exit with error if a configured formatter is missing. (env $TREEFMT_ALLOW_MISSING_FORMATTER) --ci Runs treefmt in a CI mode, enabling --no-cache, --fail-on-change and adjusting some other settings best suited to a CI use case. (env $TREEFMT_CI) -c, --clear-cache Reset the evaluation cache. Use in case the cache is not precise enough. (env $TREEFMT_CLEAR_CACHE) --completion string [bash|zsh|fish] Generate shell completion scripts for the specified shell. --config-file string Load the config file from the given path (defaults to searching upwards for treefmt.toml or .treefmt.toml). --cpu-profile string The file into which a cpu profile will be written. (env $TREEFMT_CPU_PROFILE) --excludes strings Exclude files or directories matching the specified globs. (env $TREEFMT_EXCLUDES) --fail-on-change Exit with error if any changes were made. Useful for CI. (env $TREEFMT_FAIL_ON_CHANGE) -f, --formatters strings Specify formatters to apply. Defaults to all configured formatters. (env $TREEFMT_FORMATTERS) -h, --help help for treefmt -i, --init Create a treefmt.toml file in the current directory. --no-cache Ignore the evaluation cache entirely. Useful for CI. (env $TREEFMT_NO_CACHE) -u, --on-unmatched string Log paths that did not match any formatters at the specified log level. Possible values are . (env $TREEFMT_ON_UNMATCHED) (default "info") -q, --quiet Disable all logs except errors. (env $TREEFMT_QUIET) --stdin Format the context passed in via stdin. --tree-root string The root directory from which treefmt will start walking the filesystem. Defaults to the root of the current git or jujutsu worktree. If not in a git or jujutsu repo, defaults to the directory containing the config file. (env $TREEFMT_TREE_ROOT) --tree-root-cmd string Command to run to find the tree root. It is parsed using shlex, to allow quoting arguments that contain whitespace. If you wish to pass arguments containing quotes, you should use nested quotes e.g. "'" or '"'. (env $TREEFMT_TREE_ROOT_CMD) --tree-root-file string File to search for to find the tree root. (env $TREEFMT_TREE_ROOT_FILE) -v, --verbose count Set the verbosity of logs e.g. -vv. (env $TREEFMT_VERBOSE) --version version for treefmt --walk string The method used to traverse the files within the tree root. Currently supports . (env $TREEFMT_WALK) (default "auto") -C, --working-dir string Run as if treefmt was started in the specified working directory instead of the current working directory. (env $TREEFMT_WORKING_DIR) (default ".") root_test.go:2010: setting env TREEFMT_TREE_ROOT_CMD=echo /foo/bar root_test.go:2010: setting env TREEFMT_TREE_ROOT_FILE=.git/config root_test.go:2010: treefmt root_test.go:2010: Error: failed to load config: failed to determine tree root: at most one of tree-root, tree-root-cmd or tree-root-file can be specified root_test.go:2010: root_test.go:2025: treefmt root_test.go:2025: Error: failed to load config: failed to determine tree root: at most one of tree-root, tree-root-cmd or tree-root-file can be specified root_test.go:2025: root_test.go:1997: treefmt --tree-root bar --tree-root-cmd 'echo /foo/bar' --tree-root-file .git/config root_test.go:1997: Error: if any flags in the group [tree-root tree-root-cmd tree-root-file] are set none of the others can be; [tree-root tree-root-cmd tree-root-file] were all set root_test.go:1997: Usage: treefmt [flags] Flags: --allow-missing-formatter Do not exit with error if a configured formatter is missing. (env $TREEFMT_ALLOW_MISSING_FORMATTER) --ci Runs treefmt in a CI mode, enabling --no-cache, --fail-on-change and adjusting some other settings best suited to a CI use case. (env $TREEFMT_CI) -c, --clear-cache Reset the evaluation cache. Use in case the cache is not precise enough. (env $TREEFMT_CLEAR_CACHE) --completion string [bash|zsh|fish] Generate shell completion scripts for the specified shell. --config-file string Load the config file from the given path (defaults to searching upwards for treefmt.toml or .treefmt.toml). --cpu-profile string The file into which a cpu profile will be written. (env $TREEFMT_CPU_PROFILE) --excludes strings Exclude files or directories matching the specified globs. (env $TREEFMT_EXCLUDES) --fail-on-change Exit with error if any changes were made. Useful for CI. (env $TREEFMT_FAIL_ON_CHANGE) -f, --formatters strings Specify formatters to apply. Defaults to all configured formatters. (env $TREEFMT_FORMATTERS) -h, --help help for treefmt -i, --init Create a treefmt.toml file in the current directory. --no-cache Ignore the evaluation cache entirely. Useful for CI. (env $TREEFMT_NO_CACHE) -u, --on-unmatched string Log paths that did not match any formatters at the specified log level. Possible values are . (env $TREEFMT_ON_UNMATCHED) (default "info") -q, --quiet Disable all logs except errors. (env $TREEFMT_QUIET) --stdin Format the context passed in via stdin. --tree-root string The root directory from which treefmt will start walking the filesystem. Defaults to the root of the current git or jujutsu worktree. If not in a git or jujutsu repo, defaults to the directory containing the config file. (env $TREEFMT_TREE_ROOT) --tree-root-cmd string Command to run to find the tree root. It is parsed using shlex, to allow quoting arguments that contain whitespace. If you wish to pass arguments containing quotes, you should use nested quotes e.g. "'" or '"'. (env $TREEFMT_TREE_ROOT_CMD) --tree-root-file string File to search for to find the tree root. (env $TREEFMT_TREE_ROOT_FILE) -v, --verbose count Set the verbosity of logs e.g. -vv. (env $TREEFMT_VERBOSE) --version version for treefmt --walk string The method used to traverse the files within the tree root. Currently supports . (env $TREEFMT_WALK) (default "auto") -C, --working-dir string Run as if treefmt was started in the specified working directory instead of the current working directory. (env $TREEFMT_WORKING_DIR) (default ".") root_test.go:2010: setting env TREEFMT_TREE_ROOT=bar root_test.go:2010: setting env TREEFMT_TREE_ROOT_CMD=echo /foo/bar root_test.go:2010: setting env TREEFMT_TREE_ROOT_FILE=.git/config root_test.go:2010: treefmt root_test.go:2010: Error: failed to load config: failed to determine tree root: at most one of tree-root, tree-root-cmd or tree-root-file can be specified root_test.go:2010: root_test.go:2025: treefmt root_test.go:2025: Error: failed to load config: failed to determine tree root: at most one of tree-root, tree-root-cmd or tree-root-file can be specified root_test.go:2025: --- PASS: TestTreeRootExclusivity (1.03s) === RUN TestPathsArg root_test.go:2075: treefmt root_test.go:2075: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 51ms root_test.go:2075: root_test.go:2086: treefmt rust/src/main.rs haskell/Nested/Foo.hs root_test.go:2086: traversed 2 files emitted 2 files for processing formatted 0 files (0 changed) in 27ms root_test.go:2086: root_test.go:2101: treefmt /build/TestPathsArg2408894631/001/tree-root/rust/src/main.rs root_test.go:2101: traversed 1 files emitted 1 files for processing formatted 0 files (0 changed) in 30ms root_test.go:2101: root_test.go:2113: treefmt rust/src/main.rs haskell/Nested/Bar.hs root_test.go:2113: Error: failed to create walker: path /build/TestPathsArg2408894631/001/tree-root/haskell/Nested/Bar.hs not found: lstat /build/TestPathsArg2408894631/001/tree-root/haskell/Nested/Bar.hs: no such file or directory root_test.go:2113: root_test.go:2125: treefmt /build/TestPathsArg2408894631/001/outside_tree.go root_test.go:2125: Error: failed to create walker: path /build/TestPathsArg2408894631/001/outside_tree.go not inside the tree root /build/TestPathsArg2408894631/001/tree-root (relative path: ../outside_tree.go) root_test.go:2125: root_test.go:2136: treefmt ../outside_tree.go root_test.go:2136: Error: failed to create walker: path ../outside_tree.go not inside the tree root /build/TestPathsArg2408894631/001/tree-root (relative path: ../outside_tree.go) root_test.go:2136: --- PASS: TestPathsArg (1.16s) === RUN TestStdin root_test.go:2165: treefmt --stdin root_test.go:2165: Error: exactly one path should be specified when using the --stdin flag root_test.go:2165: root_test.go:2178: treefmt --stdin test.nix root_test.go:2178: traversed 1 files emitted 1 files for processing formatted 1 files (1 changed) in 94ms root_test.go:2178: { ...}: "hello" root_test.go:2198: treefmt --stdin ../test.nix root_test.go:2198: Error: failed to create walker: path ../test.nix not inside the tree root /build/TestStdin2860913193/001 root_test.go:2198: root_test.go:2211: treefmt --stdin foo/../../test.nix root_test.go:2211: Error: failed to create walker: path foo/../../test.nix not inside the tree root /build/TestStdin2860913193/001 root_test.go:2211: root_test.go:2223: treefmt --stdin ..lotsadots.nix root_test.go:2223: traversed 1 files emitted 1 files for processing formatted 1 files (1 changed) in 84ms root_test.go:2223: { ...}: "hello" root_test.go:2247: treefmt --stdin test.md root_test.go:2247: traversed 1 files emitted 1 files for processing formatted 1 files (1 changed) in 203ms root_test.go:2247: | col1 | col2 | | ------ | --------- | | nice | fits | | oh no! | it's ugly | root_test.go:2274: treefmt --stdin foo/justfile root_test.go:2274: traversed 1 files emitted 1 files for processing formatted 1 files (1 changed) in 55ms root_test.go:2274: # print this message help: just --list --list-submodules --unsorted root_test.go:2299: treefmt -vvv --stdin path/to/foo.embed-path root_test.go:2299: INFO config: no tree root specified INFO config: setting tree root to the directory containing the config file: /build/TestStdin2860913193/001/treefmt.toml INFO config: tree root: /build/TestStdin2860913193/001 DEBUG formatter command not found: foo-fmt DEBUG Resolving path '/build/TestStdin2860913193/001' DEBUG Resolving path 'path/to/foo.embed-path' DEBUG Path '/build/TestStdin2860913193/001/path/to/foo.embed-path' does not exist, treating it as resolved DEBUG Resolving path 'path/to/foo.embed-path' DEBUG Path '/build/TestStdin2860913193/001/path/to/foo.embed-path' does not exist, treating it as resolved DEBUG read 1 files DEBUG formatter | embed-path: match: /build/TestStdin2860913193/001/path/to/foo.embed-path DEBUG formatters signature for key embed-path: 66e6789096713b16f0c8aedd98cdb1d4 DEBUG formatter | embed-path: executing: /nix/store/7skfgallm2wpgk754y4fbbjlnlfydiwa-test-fmt-embed-path/bin/test-fmt-embed-path fmt --stdin-filepath path/to/foo.embed-path INFO formatter | embed-path: 1 file(s) processed in 4.344376ms DEBUG file has changed path=path/to/foo.embed-path prev_size=52 prev_mod_time="2026-10-05 11:10:13 +0000 UTC" current_size=77 current_mod_time="2026-10-05 11:10:13 +0000 UTC" traversed 1 files emitted 1 files for processing formatted 1 files (1 changed) in 70ms DEBUG no more files to read root_test.go:2299: # path/to/foo.embed-path The formatter should add the path above this line. root_test.go:2330: treefmt --stdin ../foo/justfile root_test.go:2330: traversed 1 files emitted 1 files for processing formatted 1 files (1 changed) in 62ms root_test.go:2330: # print this message help: just --list --list-submodules --unsorted --- PASS: TestStdin (1.61s) === RUN TestDeterministicOrderingInPipeline root_test.go:2380: treefmt root_test.go:2380: traversed 33 files emitted 2 files for processing formatted 2 files (2 changed) in 47ms root_test.go:2380: root_test.go:2418: treefmt --stdin treefmt.toml root_test.go:2418: traversed 1 files emitted 0 files for processing formatted 0 files (0 changed) in 35ms root_test.go:2418: foo = "bla" bar = [ "bla" ] adsfadf; --- PASS: TestDeterministicOrderingInPipeline (1.10s) === RUN TestRunInSubdir === RUN TestRunInSubdir/auto root_test.go:2487: treefmt root_test.go:2487: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 30ms root_test.go:2487: root_test.go:2499: treefmt -c go/main.go haskell/Nested/Foo.hs root_test.go:2499: Error: failed to create walker: path /build/TestRunInSubdirauto86671417/001/go/go/main.go not found: lstat /build/TestRunInSubdirauto86671417/001/go/go/main.go: no such file or directory root_test.go:2499: root_test.go:2507: treefmt -c main.go ../haskell/Nested/Foo.hs root_test.go:2507: traversed 2 files emitted 2 files for processing formatted 2 files (0 changed) in 26ms root_test.go:2507: === RUN TestRunInSubdir/stdin root_test.go:2487: treefmt root_test.go:2487: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 29ms root_test.go:2487: root_test.go:2499: treefmt -c go/main.go haskell/Nested/Foo.hs root_test.go:2499: Error: failed to create walker: path /build/TestRunInSubdirstdin1151117926/001/go/go/main.go not found: lstat /build/TestRunInSubdirstdin1151117926/001/go/go/main.go: no such file or directory root_test.go:2499: root_test.go:2507: treefmt -c main.go ../haskell/Nested/Foo.hs root_test.go:2507: traversed 2 files emitted 2 files for processing formatted 2 files (0 changed) in 31ms root_test.go:2507: === RUN TestRunInSubdir/filesystem root_test.go:2487: treefmt root_test.go:2487: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 38ms root_test.go:2487: root_test.go:2499: treefmt -c go/main.go haskell/Nested/Foo.hs root_test.go:2499: Error: failed to create walker: path /build/TestRunInSubdirfilesystem3540979369/001/go/go/main.go not found: lstat /build/TestRunInSubdirfilesystem3540979369/001/go/go/main.go: no such file or directory root_test.go:2499: root_test.go:2507: treefmt -c main.go ../haskell/Nested/Foo.hs root_test.go:2507: traversed 2 files emitted 2 files for processing formatted 2 files (0 changed) in 37ms root_test.go:2507: === RUN TestRunInSubdir/git root_test.go:2487: treefmt root_test.go:2487: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 13ms root_test.go:2487: root_test.go:2499: treefmt -c go/main.go haskell/Nested/Foo.hs root_test.go:2499: Error: failed to create walker: path /build/TestRunInSubdirgit4015023929/001/go/go/main.go not found: lstat /build/TestRunInSubdirgit4015023929/001/go/go/main.go: no such file or directory root_test.go:2499: root_test.go:2507: treefmt -c main.go ../haskell/Nested/Foo.hs root_test.go:2507: traversed 2 files emitted 2 files for processing formatted 2 files (0 changed) in 11ms root_test.go:2507: === RUN TestRunInSubdir/jujutsu root_test.go:2487: treefmt root_test.go:2487: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 84ms root_test.go:2487: root_test.go:2499: treefmt -c go/main.go haskell/Nested/Foo.hs root_test.go:2499: Error: failed to create walker: path /build/TestRunInSubdirjujutsu3407629925/001/go/go/main.go not found: lstat /build/TestRunInSubdirjujutsu3407629925/001/go/go/main.go: no such file or directory root_test.go:2499: root_test.go:2507: treefmt -c main.go ../haskell/Nested/Foo.hs root_test.go:2507: traversed 2 files emitted 2 files for processing formatted 2 files (0 changed) in 42ms root_test.go:2507: --- PASS: TestRunInSubdir (5.52s) --- PASS: TestRunInSubdir/auto (1.08s) --- PASS: TestRunInSubdir/stdin (1.09s) --- PASS: TestRunInSubdir/filesystem (1.11s) --- PASS: TestRunInSubdir/git (1.06s) --- PASS: TestRunInSubdir/jujutsu (1.19s) === RUN TestProjectRootIsSymlink root_test.go:2554: treefmt -c go/main.go root_test.go:2554: traversed 1 files emitted 1 files for processing formatted 1 files (0 changed) in 30ms root_test.go:2554: root_test.go:2566: treefmt -c symlink-to-yaml-dir root_test.go:2566: traversed 1 files emitted 1 files for processing formatted 1 files (0 changed) in 34ms root_test.go:2566: root_test.go:2578: treefmt -c . root_test.go:2578: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 30ms root_test.go:2578: --- PASS: TestProjectRootIsSymlink (1.12s) === RUN TestConcurrentInvocation root_test.go:2619: treefmt --formatters slow root_test.go:2630: treefmt --formatters echo root_test.go:2630: Error: failed to open cache: failed to open cache db at /build/.cache/treefmt/eval-cache/1e4bb27eeeeaeab870abf92df52d3593cc73dfa5921c5a49134c59140390bbd2.db: timeout root_test.go:2630: root_test.go:2619: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 2.061s root_test.go:2619: root_test.go:2643: treefmt --formatters slow root_test.go:2654: treefmt -c --formatters echo root_test.go:2654: traversed 33 files emitted 33 files for processing formatted 33 files (0 changed) in 43ms root_test.go:2654: root_test.go:2643: traversed 33 files emitted 33 files for processing formatted 1 files (1 changed) in 2.047s root_test.go:2643: --- PASS: TestConcurrentInvocation (5.12s) === RUN TestNoPositionalArgSupport root_test.go:2680: treefmt root_test.go:2680: traversed 33 files emitted 33 files for processing formatted 33 files (33 changed) in 178ms root_test.go:2680: --- PASS: TestNoPositionalArgSupport (1.19s) FAIL coverage: 67.6% of statements FAIL github.com/numtide/treefmt/v2/cmd 47.140s github.com/numtide/treefmt/v2/cmd/format coverage: 0.0% of statements github.com/numtide/treefmt/v2/cmd/init coverage: 0.0% of statements === RUN TestAllowMissingFormatter 2026/10/05 11:09:40 INFO config: no tree root specified 2026/10/05 11:09:40 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:40 INFO config: tree root: /build/TestAllowMissingFormatter3881047354/001 2026/10/05 11:09:40 INFO config: no tree root specified 2026/10/05 11:09:40 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:40 INFO config: tree root: /build/TestAllowMissingFormatter3881047354/001 2026/10/05 11:09:40 INFO config: no tree root specified 2026/10/05 11:09:40 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:40 INFO config: tree root: /build/TestAllowMissingFormatter3881047354/001 2026/10/05 11:09:40 INFO config: no tree root specified 2026/10/05 11:09:40 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:40 INFO config: tree root: /build/TestAllowMissingFormatter3881047354/001 --- PASS: TestAllowMissingFormatter (0.07s) === RUN TestCI 2026/10/05 11:09:40 INFO config: no tree root specified 2026/10/05 11:09:40 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCI3936896729/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCI3936896729/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCI3936896729/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCI3936896729/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCI3936896729/001 --- PASS: TestCI (0.06s) === RUN TestClearCache 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestClearCache3451839335/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestClearCache3451839335/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestClearCache3451839335/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestClearCache3451839335/001 --- PASS: TestClearCache (0.04s) === RUN TestCpuProfile 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCpuProfile4168023866/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCpuProfile4168023866/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCpuProfile4168023866/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestCpuProfile4168023866/001 --- PASS: TestCpuProfile (0.05s) === RUN TestExcludes 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestExcludes3679790211/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestExcludes3679790211/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestExcludes3679790211/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestExcludes3679790211/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestExcludes3679790211/001 --- PASS: TestExcludes (0.03s) === RUN TestFailOnChange 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFailOnChange1744087108/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFailOnChange1744087108/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFailOnChange1744087108/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFailOnChange1744087108/001 --- PASS: TestFailOnChange (0.03s) === RUN TestFormatters 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFormatters354521187/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFormatters354521187/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFormatters354521187/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFormatters354521187/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestFormatters354521187/001 --- PASS: TestFormatters (0.03s) === RUN TestNoCache 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestNoCache68577357/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestNoCache68577357/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestNoCache68577357/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestNoCache68577357/001 --- PASS: TestNoCache (0.04s) === RUN TestQuiet 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestQuiet3979304027/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestQuiet3979304027/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestQuiet3979304027/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestQuiet3979304027/001 --- PASS: TestQuiet (0.03s) === RUN TestOnUnmatched 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestOnUnmatched761917497/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestOnUnmatched761917497/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestOnUnmatched761917497/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestOnUnmatched761917497/001 --- PASS: TestOnUnmatched (0.04s) === RUN TestTreeRoot 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRoot2858788290/001 2026/10/05 11:09:41 INFO config: tree root specified explicitly: /foo/bar 2026/10/05 11:09:41 INFO config: tree root: /foo/bar 2026/10/05 11:09:41 INFO config: tree root specified explicitly: /fizz/buzz 2026/10/05 11:09:41 INFO config: tree root: /fizz/buzz 2026/10/05 11:09:41 INFO config: tree root specified explicitly: /flip/flop 2026/10/05 11:09:41 INFO config: tree root: /flip/flop --- PASS: TestTreeRoot (0.02s) === RUN TestTreeRootFile 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRootFile3874739482/001 2026/10/05 11:09:41 INFO config: searching for tree root using tree-root-file: a.txt 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRootFile3874739482/002/foo/bar 2026/10/05 11:09:41 INFO config: searching for tree root using tree-root-file: go.mod 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRootFile3874739482/002/foo 2026/10/05 11:09:41 INFO config: searching for tree root using tree-root-file: .git/config 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRootFile3874739482/002 --- PASS: TestTreeRootFile (0.03s) === RUN TestTreeRootCmd 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRootCmd3758629430/001 2026/10/05 11:09:41 INFO config: searching for tree root using tree-root-cmd: echo /build/TestTreeRootCmd3758629430/002 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRootCmd3758629430/002 2026/10/05 11:09:41 INFO config: searching for tree root using tree-root-cmd: echo "/build/TestTreeRootCmd3758629430/002/foo" 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRootCmd3758629430/002/foo 2026/10/05 11:09:41 INFO config: searching for tree root using tree-root-cmd: echo '/build/TestTreeRootCmd3758629430/002/bar' 2026/10/05 11:09:41 INFO config: tree root: /build/TestTreeRootCmd3758629430/002/bar 2026/10/05 11:09:41 INFO config: searching for tree root using tree-root-cmd: echo '' --- PASS: TestTreeRootCmd (0.05s) === RUN TestVerbosity 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestVerbosity3202124911/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestVerbosity3202124911/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestVerbosity3202124911/001 --- PASS: TestVerbosity (0.02s) === RUN TestWalk 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestWalk254859533/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestWalk254859533/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: setting tree root to the directory containing the config file: /build/TestWalk254859533/001/treefmt.toml 2026/10/05 11:09:41 INFO config: tree root: /build/TestWalk254859533/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestWalk254859533/001 --- PASS: TestWalk (0.04s) === RUN TestWorkingDirectory 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestWorkingDirectory2550657452/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestWorkingDirectory2550657452/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: failed to resolve tree root with git: failed to execute tree-root-cmd: exit status 128 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using jujutsu: jj workspace root 2026/10/05 11:09:41 INFO config: failed to resolve tree root with jujutsu: failed to execute tree-root-cmd: exit status 1 2026/10/05 11:09:41 INFO config: setting tree root to the directory containing the config file: /build/TestWorkingDirectory2550657452/001/treefmt.toml 2026/10/05 11:09:41 INFO config: tree root: /build/TestWorkingDirectory2550657452/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: failed to resolve tree root with git: failed to execute tree-root-cmd: exit status 128 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using jujutsu: jj workspace root 2026/10/05 11:09:41 INFO config: failed to resolve tree root with jujutsu: failed to execute tree-root-cmd: exit status 1 2026/10/05 11:09:41 INFO config: setting tree root to the directory containing the config file: /build/TestWorkingDirectory2550657452/001/treefmt.toml 2026/10/05 11:09:41 INFO config: tree root: /build/TestWorkingDirectory2550657452/001 --- PASS: TestWorkingDirectory (0.15s) === RUN TestStdin 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestStdin1088616833/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestStdin1088616833/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: attempting to resolve tree root using git: git rev-parse --show-toplevel 2026/10/05 11:09:41 INFO config: tree root: /build/TestStdin1088616833/001 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: setting tree root to the directory containing the config file: /build/TestStdin1088616833/001/treefmt.toml 2026/10/05 11:09:41 INFO config: tree root: /build/TestStdin1088616833/001 --- PASS: TestStdin (0.03s) === RUN TestSampleConfigFile 2026/10/05 11:09:41 INFO config: no tree root specified 2026/10/05 11:09:41 INFO config: setting tree root to the directory containing the config file: ../test/examples/treefmt.toml 2026/10/05 11:09:41 INFO config: tree root: /build/source/test/examples --- PASS: TestSampleConfigFile (0.00s) PASS coverage: 86.4% of statements ok github.com/numtide/treefmt/v2/config 1.813s coverage: 86.4% of statements === RUN TestApplyWithDefaultStdin 2026/10/05 11:09:40 INFO formatter | cat: 1 file(s) processed in 2.551559ms --- PASS: TestApplyWithDefaultStdin (0.01s) === RUN TestInvalidFormatterName --- PASS: TestInvalidFormatterName (0.01s) === RUN TestFormatSignature === RUN TestFormatSignature/change_formatter_mod_time formatter_test.go:120: changing mod time of black formatter_test.go:120: changing mod time of rufo === RUN TestFormatSignature/modify_formatter_options === RUN TestFormatSignature/add/remove_formatters --- PASS: TestFormatSignature (0.01s) --- PASS: TestFormatSignature/change_formatter_mod_time (0.00s) --- PASS: TestFormatSignature/modify_formatter_options (0.00s) --- PASS: TestFormatSignature/add/remove_formatters (0.00s) === RUN TestGlobs --- PASS: TestGlobs (0.00s) PASS coverage: 40.9% of statements ok github.com/numtide/treefmt/v2/format 1.079s coverage: 40.9% of statements github.com/numtide/treefmt/v2/git coverage: 0.0% of statements github.com/numtide/treefmt/v2/jujutsu coverage: 0.0% of statements github.com/numtide/treefmt/v2/stats coverage: 0.0% of statements github.com/numtide/treefmt/v2/test coverage: 0.0% of statements === RUN TestFilesystemReaderCancellation --- PASS: TestFilesystemReaderCancellation (1.01s) === RUN TestFilesystemReader --- PASS: TestFilesystemReader (1.01s) === RUN TestFilesystemReaderSubpaths --- PASS: TestFilesystemReaderSubpaths (1.02s) === RUN TestGitReader --- PASS: TestGitReader (2.16s) === RUN TestJujutsuReader --- PASS: TestJujutsuReader (1.13s) === RUN TestJujutsuReaderUsesTreeRoot --- PASS: TestJujutsuReaderUsesTreeRoot (0.06s) === RUN TestPathStreamReader 2026/10/05 11:09:48 WARN walk | test walker: Path /build/TestPathStreamReader661937442/001/missing.txt was emitted by test walker but no file exists at that path --- PASS: TestPathStreamReader (1.02s) === RUN TestPathStreamReaderSubpath --- PASS: TestPathStreamReaderSubpath (1.01s) === RUN TestPathStreamReaderPassesPathFilters --- PASS: TestPathStreamReaderPassesPathFilters (1.01s) === RUN TestPathStreamReaderDelimiters --- PASS: TestPathStreamReaderDelimiters (1.01s) === RUN TestPathStreamReaderCloseUnblocks --- PASS: TestPathStreamReaderCloseUnblocks (0.05s) === RUN TestPathStreamReaderCommandFailure --- PASS: TestPathStreamReaderCommandFailure (1.01s) PASS coverage: 35.2% of statements ok github.com/numtide/treefmt/v2/walk 12.594s coverage: 35.2% of statements github.com/numtide/treefmt/v2/walk/cache coverage: 0.0% of statements FAIL