KScript 文档
ZH

错误代码

KS6024

一个以 true 或 false 命名的是/否选项。 只有开或关两种状态的选项是一个标志:仅写其名称表示 true,名称前加 not 表示 false。

<let name="rows" value="$readings->cells(header: false)" /> <!-- the warning: header: false -->
$rows = $readings->cells(header: false) // the warning: header: false
<let name="rows" value="$readings->cells(not header)" /> <!-- the same call, written as a flag -->
$rows = $readings->cells(not header) // the same call, written as a flag

脚本仍然可以运行,所以这只是一个警告。Write not header会重写它,而kscript check --fix会处理文件中的每一项。

Edit this page on GitHub