scheb/idea-inspections-checkstyle-converter

此包已被放弃且不再维护。未建议替代包。

将 IDEA 检查 XML 格式转换为 Checkstyle

1.2.0 2019-02-10 14:34 UTC

This package is auto-updated.

Last update: 2020-12-30 10:36:45 UTC


README

将 JetBrains IDE(如 IntelliJ 和 PHPStorm)的检查结果从其 XML 格式转换为 Checkstyle 格式。

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

安装

$ composer require scheb/idea-inspections-checkstyle-converter

使用

./vendor/bin/inspection-converter [inspectionsFolder] [checkstyleOutputFile]

Arguments:
  inspectionsFolder                        Folder with the inspections XML files
  checkstyleOutputFile                     Checkstyle file to be written

Options:
  -r, --projectRoot=PROJECTROOT            Path to the project root [default: ""]
  -i, --ignoreInspection=IGNOREINSPECTION  Ignore inspections matching the regex pattern (multiple values allowed)
  -m, --ignoreMessage=IGNOREMESSAGE        Ignore messages matching the regex pattern (multiple values allowed)
  -f, --ignoreFile=IGNOREFILE              Ignore files matching the regex pattern (multiple values allowed)
  -s, --ignoreSeverity=IGNORESEVERITY      Ignore severities (exact match) (multiple values allowed)
  -S, --mapSeverity=MAPSEVERITY            Map severity from to, format "input:output" (multiple values allowed)
  -D, --defaultSeverity=DEFAULTSEVERITY    Used in combination with mapSeverity to define the default severity

示例

./vendor/bin/inspection-converter ./inspections ./checkstyle.xml --rootPath=src --ignoreInspection=SpellCheckingInspection --ignoreMessage=type.*long

贡献

欢迎您通过 贡献 此库,在问题部分创建拉取请求或功能请求。对于拉取请求,请遵循以下指南

  • Symfony 代码风格
  • PHP7.1 为所有内容添加类型提示(包括:返回类型、void、可空类型)
  • 请添加/更新测试用例
  • 测试方法应命名为 [method]_[scenario]_[expected result]

要运行测试套件,请使用 composer install 安装依赖项,然后执行 bin/phpunit

许可

此库可在 MIT 许可证 下获得。