mise tasks validate
- 用法:
mise tasks validate [--errors-only] [--json] [TASKS]… - 效果: 只读
- 源代码:
src/cli/tasks/validate.rs
Check task definitions for errors
Checks each task for dependency cycles; references to tasks that do not exist; #USAGE specs that do not parse; invalid timeout values; aliases that more than one task uses; missing or non-executable file tasks; invalid dir paths and templates; missing shell executables; invalid sources and outputs globs; broken task references in run arrays, empty scripts, and tasks with nothing to run; required daemons that no readable [daemons] section declares; and secrets grants that conflict with the sandbox or [env], or, when the config is trusted, that name keys missing from the secrets source.
Exits 1 if any error is found, so you can run it in CI. Warnings are reported but do not fail the command.
Arguments
[TASKS]…— Tasks to validate (default: all tasks)
标志
--errors-only— 仅显示错误(跳过警告)--json— 以 JSON 格式输出验证结果-h --help— 打印帮助
示例
验证所有任务
mise tasks validate验证指定任务
mise tasks validate build test以 JSON 格式输出结果
mise tasks validate --json仅显示错误(跳过警告)
mise tasks validate --errors-only