Inspections from CLI script


is it possible (technically/legally) to run inspections from a CLI script? Or at least to use Java API?

I'd love to run inspections automatically on testing server to find possible problems.

Thanks for info


Actually it's not working. Idea can take action keyword as first command line argument, but PhpStorm always assumes it's file to be opened :( (PhpStorm-107.581)

EDIT: It seems to be fine at my home PC with PhpStorm-107.120, will try again at work next week.


Now I found what was the problem, I had PhpStorm running. As there cannot be more instances of PhpStorm, you cannot run CLI application when you have IDE running.


So you got it to work? I can't find my post where I asked about this, but it would not run for me (threw errors.) I think Alexey said he was going to look into it, but have heard nothing back.


You're right, same issue as you have.

It took me some time to realize I cannot have PhpStorm running, so I was just so happy to see that it started reacting to 'inspect' parameter at least somehow.

It works in IDEA, so I guess something wrong with the build. I'll have a look next week when I'm back from holiday


Thanks Alexey, can't wait for it! Hope it will be available soon