Code inspection report. Follow
I would like to ask if I can somehow run the inspection code from the command line and get the report as a file? XML or even plain file?
I have a big project that I need to clean and if I could generate such a report every now and then, it would really help me. Maybe copy code inspection to TeamCity?
Please sign in to leave a comment.
Please look here
(We'll update WS/PS docs later)
As for TeamCity - it has built-in inspection runner for all inspections available in IDEA Ultimate, so you need to just provide your inspection profile to Inspection build runner.
FYI, are you aware that those webhelp pages don't work in IE9, unless I turn Compatability View on?
I was sooo excited to see this, but here is the batch files it says to run:
call idea.bat inspect %*
idea.bat does not exist in that folder. Should it?
Also, what is inspect_diff.bat?
Does idea.bat exist in your \bin folder (or are you on Linux, and if so, does the inspect.sh file exist)?
well, replace with IDENAME.bat
basically commandline is
IDE.exe inspect "AllOtherOptionsAsDescribedInHelp"
Nope. There are way too much browsers nowadays as for me. Anyway, I forwarded your request to appropriate department.
I'm confused when I run inspect.bat like this:
inspect.bat C:\inetpub\Intranet_Local\.idea\Intranet_Local.iml C:\inetpub\Intranet_Local\.idea\inspectionProfiles\Critical.xml c:\result.xml -v2
I get this:
Starting up JetBrains PhpStorm 2.1.2 ...done.
Opening project...[ 2414] ERROR - spection.InspectionApplication - null
at java.security.AccessController.doPrivileged(Native Method)
[ 2415] ERROR - spection.InspectionApplication - JetBrains PhpStorm 2.1.2 Bu
[ 2416] ERROR - spection.InspectionApplication - JDK: 1.6.0_24
[ 2416] ERROR - spection.InspectionApplication - VM: Java HotSpot(TM) Client
[ 2416] ERROR - spection.InspectionApplication - Vendor: Sun Microsystems Inc
[ 2416] ERROR - spection.InspectionApplication - OS: Windows 7
[ 2416] ERROR - spection.InspectionApplication - Last Action:
But you are saying to run it like this?
C:\Program Files (x86)\PHPStorm\bin>PhpStorm.exe inspect C:\inetpub\Intranet_Local\.idea\Intranet_Local.iml C:\inetpub\Intranet_Local\.idea\inspectionProfiles\Critical.xml c:\result.xml -v2
well judging the contents of the bat file this is essentially the same.
As for the error - it might be just broken in current build (almost nobody uses it).
I'll investigate it a bit..
I imagine, but we've been wanting something like this for some time. I was so excited to see your response to his post. I never saw that feature added.
Its a part of the IDEA and the platform and is used there and by TeamCity for running automated Inspection bulds on your project on the separate agents.
Inspections can run for 12 hours for a huge project.. Also TC provides a diff - i.e. lists all NEW problems for a build (which can be run per check in or daily or...)
Fixed for 3.0 EAP