littlemanco/arcanist-lint-checkstyle

一个扩展 Arcanist lints 支持Checkstyle 输出的包

2.0.0 2017-01-29 13:07 UTC

This package is not auto-updated.

Last update: 2024-09-28 19:58:22 UTC


README

项目目标

Arcanist 提供了一个出色的 linting 系统,可以聚合其他 linting 工具以方便使用。这使得输出内容为 checkstyle 格式的工具可以被 arcanist 消费。

类似工作

这主要基于现有的脚本和正则表达式检查

合理性

我无法找到一种简单地将 Checkstyle 内容导入 arcanist 的方法;Checkstyle 是 XML 格式,因此构建解析器既容易又有趣。

限制

  • 仅与 shellcheck 测试

摘要

  • 许可证: MIT
  • 代码风格: PSR2*
  • 区域: en-AU [lang]_
  • 有趣的是,它没有通过 PSR2

兼容性

PHP

  • 5.6 (可能)
  • 7

安装

此工具可以使用 composer 安装

$ composer require --dev littlemanco/arcanist-lint-checkstyle

它在 Packagist 上可用,因此应该“直接使用”

用法

此 linter 与正常的 Arcanist lints 集成,但是需要一些额外的设置才能让 arcanist 找到 linter。在你的仓库中创建一个文件,如下所示

{
  "load": [
    "vendor/littlemanco/arcanist-lint-checkstyle/src/"
  ]
}

这允许 arcanist 发现 lint。然后,它可以像其他 lints 一样进行配置

{
  "linters": {
    ...
    "sh": {
      "type": "checkstyle",
      "include": "(\\.sh$)",
      "checkstyle.script": "sh -c 'shellcheck --format=checkstyle \"$0\" || true'"
    }
    ...
  }
}

感谢

  • Phabricator
  • Checkstyle
  • Shellcheck

贡献

欢迎贡献!没有什么太小,开始的最佳方式是打开一个问题。

参考

.. [lang] Lingoes.net,. (2015). Language Code Table. Retrieved 4 June 2015, from http://www.lingoes.net/en/translator/langcode.htm