Skip to content
Convert IDEA (IntelliJ, PHPStorm) inspection XML format to checkstyle
Branch: master
Clone or download
Latest commit 0958189 Feb 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add option to map severity Feb 10, 2019
tests
.editorconfig
.gitignore
.php_cs.dist Initial commit Jan 30, 2019
.scrutinizer.yml
.travis.yml Initial commit Jan 30, 2019
LICENSE
README.md
composer.json Update scheb/idea-inspections-core Feb 10, 2019
inspection-converter Move core classes to its own library, change namespace Feb 3, 2019
phpunit.xml.dist

README.md

scheb/idea-inspections-checkstyle-converter

Convert inspection results from JetBrains IDEs (like IntelliJ and PHPStorm) from its XML format to the Checkstyle format.

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

Installation

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

Usage

./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

Example:

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

Contribute

You're welcome to contribute to this library by creating a pull requests or feature request in the issues section. For pull requests, please follow these guidelines:

  • Symfony code style
  • PHP7.1 type hints for everything (including: return types, void, nullable types)
  • Please add/update test cases
  • Test methods should be named [method]_[scenario]_[expected result]

To run the test suite install the dependencies with composer install and then execute bin/phpunit.

License

This library is available under the MIT license.

You can’t perform that action at this time.