代码之家  ›  专栏  ›  技术社区  ›  acjay Sreekanth

如何在Arcanist中设置YAML linting?

  •  0
  • acjay Sreekanth  · 技术社区  · 7 年前

    我不知道如何在Arcanist(特别是YAML)中进行定制的线绳预差。这个 instructions 不要解释如何将新的过梁集成到现有的过梁中 .arclint 配置

    1 回复  |  直到 7 年前
        1
  •  1
  •   acjay Sreekanth    7 年前

    我自己发现了这一点,并认为我会在这里分享,以防其他人有这个问题。

    以下 .arclint

    {
      "linters": {
        "yaml": {
          "type": "script-and-regex",
          "script-and-regex.script": "yamllint",
          "script-and-regex.regex": "/^(?P<line>\\d+):(?P<offset>\\d+) +(?P<severity>warning|error) +(?P<message>.*) +\\((?P<name>.*)\\)$/m",
          "include": "(\\.yml$)",
          "exclude": [ ]
        }
      }
    }
    

    我还没有广泛地试用过这个正则表达式,但到目前为止它对我的目的是有效的。

    configure Yamllint 通过填充 .yamllint 存储库根目录中的文件。

    推荐文章