问题描述
我在我的应用程序中使用 NodeJS 中的 Bazel 规则。目的是简单地 lint 一组文件并在 linting 失败时使构建失败。我目前遇到的是,尽管存在 lint 错误,但构建还是成功的。
这是我的 BUILD
文件的一部分:
load("@npm//htmlhint:index.bzl","htmlhint")
filegroup(
name = "htmldata",srcs = glob(["**/*.html"]),)
htmlhint(
name = "compile",data = [
"htmlhint.conf","//:htmldata"
],args = [
"--config","htmlhint.conf","$(locations //:htmldata)"
]
)
我首先加载提示库,然后为所有我想要 lint 的 HTML 文件定义一个文件组。之后,我使用规则及其数据和参数。
为了运行构建,我通过 npm 脚本使用默认选项:bazel build //...
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)