Phabricator linter 找不到任何 lintable 路径

Phabricator linter can't find any lintable paths

如何将 phabricator 配置为仅检查匹配 *py 的文件?

以下是我的 .arclint 文件:

{
  "linters": {
    "pylint": {
      "type": "pylint",
      "include": "(\.py$)"
    }
  }
}

这主要基于此处找到的示例: https://secure.phabricator.com/book/phabricator/article/arcanist_lint/

当我 运行 我得到这个:

$ arc lint 
No paths are lintable.

如果我删除 include 行,它会尝试对每个文件进行 lint,因此正则表达式一定有问题:"(\.py$)" 老实说,这对我来说很奇怪,但这正是我在例子。而"(*.py)""*.py""^*.py$"都是无效的正则表达式。

事实证明,正则表达式实际上没有任何问题。我只是没有正确使用 arc lint

arc lint 命令仅尝试对已修改的文件进行 lint。我只是希望它表现得像 arc lint --everything.

$ arc lint --help

  lint [options] [paths]
  lint [options] --rev [rev]
      Supports: git, svn, hg
      Run static analysis on changes to check for mistakes. If no files
      are specified, lint will be run on all files which have been modified.