Reputation: 820
I'm attempting to implement some quality control on a project, and I've removed all warnings for my project according to a specific profile in the PhpStorm code inspector. Now I want to set up an automated check (maybe a git hook or Jenkins job) so that people don't add additional warnings.
Basically, what I need to do is to run PhpStorm's code > inspect functionality from the command line.
It appears that, by default, PhpStorm uses some kind of internal code inspection tool when I run code > inspect code. It has plugins for PHP Code Sniff and others, but I don't really want to use those. For example, PHP Code Sniff finds all kinds of spacing errors and such (it's a linter, after all), but it doesn't detect things like passing the wrong number of arguments to method signatures (i.e. the stuff I really care about).
So, is there any way to run PhpStorm's code inspection external to PhpStorm?
Upvotes: 1
Views: 123
Reputation: 820
Hmmm...
Looks like posting this question may have given me the clarity I needed to search for the correct answer. Looks like there's a way to do this outlined in the PHPStorm documentation:
https://www.jetbrains.com/help/phpstorm/command-line-code-inspector.html
Upvotes: 1