英文:
precommit: running a linter that only takes one filename at a time
问题
我们有一个通过 xqlint lint target_file
运行的代码检查工具,但似乎不支持多个文件名。
在 precommit 中是否有一种方法可以针对每个文件分别运行,而不需要使用以下方式:
entry: bash -c "for $f in $@; do xqlint lint $f; done"
(虽然这种方式有效,但不太美观且不太可移植。)
英文:
We have a linter that runs with xqlint lint target_file
but doesn't seem to support multiple filenames.
Is there a way in precommit to run against each file separately, without resorting to
entry: bash -c "for $f in $@; do xqlint lint $f; done"
(which seems to work but is ugly and less portable.)
答案1
得分: 1
没有故意的。反复启动和停止进程是低效和浪费资源的。该工具应该可以自动适应接受多个位置参数。
免责声明:我编写了pre-commit。
英文:
there is intentionally not. starting and stopping processes repeatedly is slow and wasteful. the tool should adjust to take multiple positional arguments
__
disclaimer: I wrote pre-commit
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论