future-oxygen-10553
05/04/2023, 10:20 PMshfmt
does, it doesn’t seem so, but then again this is now a targetless formtter which may be differentbitter-ability-32190
05/04/2023, 10:26 PMfuture-oxygen-10553
05/04/2023, 10:27 PMprint(var[0].content)
you commented on shows the correct output 😉 But the output from taplo should show that it ignored one file and it only shows the two files it’s supposed to format. Example in the next message…tree -a taplo-tests/
taplo-tests/
├── .taplo.toml
└── tester.toml
taplo fmt taplo-tests/
INFO taplo:format_files:collect_files: found files total=1 excluded=1 cwd="/Users/bweber/Documents"
tester.toml
and the .taplo.toml
and excluded the latterINFO taplo:format_files:collect_files: found files total=2 excluded=0 cwd="/private/tmp/pants-sandbox-RO8siG"
bitter-ability-32190
05/04/2023, 11:09 PMfuture-oxygen-10553
05/05/2023, 2:27 PMbitter-ability-32190
05/05/2023, 2:28 PMfuture-oxygen-10553
05/05/2023, 2:29 PMtaplo-tests
folder. My cwd is the parent of taplo-tests
, so taplo doesn’t use the config file but it does exclude it from formattingbitter-ability-32190
05/05/2023, 6:07 PMbut it does exclude it from formattingSo I see that the strings before/after for the config are different:
"a/.taplo.toml": "[formatting]\ncompact_entries = true\n",
"a/.taplo.toml": "[formatting]\ncompact_entries=true\n",
NEEDS_CONFIG_FILE
the test gets past this assert--config
option isn't specifieddef test_config_files(rule_runner: RuleRunner) -> None:
rule_runner.write_files(
{
"a/f.toml": NEEDS_CONFIG_FILE,
".taplo.toml": "[formatting]\ncompact_entries = true\n",
"b/f.toml": NEEDS_CONFIG_FILE,
}
)
fmt_result = run_taplo(rule_runner)
assert fmt_result.stdout == ""
assert fmt_result.output == rule_runner.make_snapshot(
{
"a/f.toml": FIXED_NEEDS_CONFIG_FILE,
"b/f.toml": FIXED_NEEDS_CONFIG_FILE,
".taplo.toml": "[formatting]\ncompact_entries=true\n",
}
)
assert fmt_result.did_change is True
future-oxygen-10553
05/05/2023, 8:54 PMbitter-ability-32190
05/11/2023, 2:46 PMfuture-oxygen-10553
05/11/2023, 2:46 PMbitter-ability-32190
05/11/2023, 2:49 PMfuture-oxygen-10553
05/11/2023, 3:02 PM