Download the PHP package shopsys/phpstorm-inspect without Composer
On this page you can find all versions of the php package shopsys/phpstorm-inspect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shopsys/phpstorm-inspect
More information about shopsys/phpstorm-inspect
Files in shopsys/phpstorm-inspect
Package phpstorm-inspect
Short Description Package for running PhpStorm's inspections from CLI and displaying results
License MIT
Informations about the package phpstorm-inspect
phpstorm-inspect
This package enables you to comfortably use PhpStorm as a CLI tool for static analysis.
Basically, it is a wrapper for PhpStorm's inspect.sh
script that does some extra work:
- waits for PhpStorm to finish already running inspections (because PhpStorm cannot run more instances of
inspect.sh
in simultaneously; see IDEA-150272) - clears PhpStorm's cache before every run in order to prevent stale cache issues (otherwise PhpStorm sometimes fails to see new files when switching GIT branches)
- parses XML output generated by PhpStorm and presents it in a readable form (similar to tools like PHP CodeSniffer, PHPMD or PHP CS Fixer)
Usage
Arguments description
inspectShExecutableFilepath
- path toinspect.sh
scriptphpstormSystemPath
- path to.WebIde*/system
directoryprojectPath
- path to project directory (that contains.idea
directory)inspectionProfileFilepath
- path to inspection profile XML fileinspectedDirectory
- path in which are the inspected sourcesformat (optional)
- format of output result, accepted values: "text" (default value) / "checkstyle"
Example (text format)
Output
Example (checkstyle format)
Content of report.xml
FAQ / Issues
Why should I use this package when I can simply run the inspections from IDE?
This package comes handy in environments where you do not have graphical interface.
For example, you can run static code analysis on your Continuous Integration server (eg. Jenkins).
Does CLI inspections work when PhpStorm IDE is running?
Unfortunately not. PhpStorm currently does not support running inspect.sh
script when IDE is running. You need to close the IDE when you want to run inspections from CLI.
What PhpStorm versions are supported?
The package was tested with PhpStorm 8.0 (139.732) but the newer versions will probably work too.