我有这个简单的代码
import qbs
Project {
name: "simple_test"
Product {
name: "micro"
type: "other"
Group {
files: '*.q'
fileTags: ['qfile']
}
Rule {
id: check1
inputs: ["qfile"]
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "QFile passing"
cmd.silent = false;
cmd.highlight = "compiler";
cmd.sourceCode = function() {
print("Nothing to do");
};
return cmd;
}
}
Transformer {
inputs: ['blink.q']
Artifact {
filePath: "processed_qfile.txt"
fileTags: "processed_qfile"
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "QFile transformer";
cmd.highlight = "compiler";
cmd.sourceCode = function() {
print("Another nothing");
};
return cmd;
}
}
}
}
并放两个文件blink.q 和blink1.q
通过文档,我必须在“编译输出”窗口中看到 3 行:两行带有“QFile Passing”,另一行带有“QFile 转换器”
但我看到只有 Transformer 块有效(根本没有“QFile Passing”);(我的规则有什么问题?