test(cli): format --check with a rule name writes nothing
`crafter-build format --check format` read the second `format` as the verb again, which set the mode back to applying and recorded no glob, so it ran every transform and rewrote the project's sources, and exited 0, though `--check` writes nothing. FormatCheckGlob drives Run() on a staged project whose one rule, named "format", would change its main.cpp, and holds the run to exiting 1, the check with a file to change, with main.cpp as it was. It fails before the verb enum of the commit before this one and passes with it.
This commit is contained in:
parent
2c3d0b0d1f
commit
4b1585c709
4 changed files with 99 additions and 0 deletions
|
|
@ -255,6 +255,8 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
cfg.AddTest("StdPcmRebuild").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("CompilerWarning").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("CleanProject").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("FormatCheckGlob").Dependencies({ CrafterBuildLib.get() })
|
||||
.LinkFlag("-Wl,--export-dynamic").LinkFlag("-ldl");
|
||||
cfg.AddTest("ShaderCompile").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("ShaderVariantBuild").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("ShaderIncludeChange").Dependencies({ CrafterBuildLib.get() });
|
||||
|
|
|
|||
Loading…
Reference in a new issue