Teamcity "Inspections" runner doesn't pick up inspection profile properly
Hi all.
I'm trying to apply shared inspection profile to the inspection runner, but get an default profile instead.
my checkout directory layout is:
56176e502acc15b
.idea
module1
module2
.idea, module1, module 2 retrieved from different vcs roots.
inspection profile header is is:
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="true">
<option name="myName" value="base" />
<option name="myLocal" value="false" />
....
</component>
i put in the ptoject configuration:
Inspection profile path => .idea/inspectionProfiles/base.xml
Inspection profile name => base
but idea picks up some other profile.
My profile contains this line:
<inspection_tool enabled="false" level="ERROR" enabled_by_default="false" />
In log i see message: Inspecting with profile 'base'
But i see css inspection results in the corresponding tab.
What's i do wrong?
Thanks in advance!
Message was edited by: Alexander Ashitkin
Please sign in to leave a comment.
Hi!
Any ideas on that?
Thanks, Alex.
With default project structure you can left profile path setting blank, and specify profile name only.
Related issue: http://youtrack.jetbrains.net/issue/TW-17207
Hi, Michael.
I tried to leave the profile path blank, but result the same.I also verified content of checkout directory to not be fooled and reparsed project from the runner page as well. But i still see excluded css inspections in the results tab.
Hi
We have exactly the same issue.
Using the .idea project structure in IDEA and the Maven 2 Project File Type, I cannot get TeamCity to pick up my custom inspection profile (named 'RedundantSuppression'). Even if the log message says it is picking up my explicitly specified profile (with only 1 inspection enabled), TC is still using some default profile that generates thousands of (unrelated) warnings.
[07:51:39]: Inspecting with profile 'RedundantSuppression'
[07:51:40]: Analyzing code ... 0%
...
[07:52:43]: Done.
...
[07:52:47]: Total: 2603 (+0 -0) Errors: 163 (+0 -0)
It would be great if the docs (or the forum) were very explicit on how to properly configure a custom inspection profile when using the .idea project structure.
Any help to get my inspection builds runnig on TC would be highly appreciated!
Regards, Etienne
Hi, Etienne
+1 from documentation should be more clear. Consider to vote also for the TW-17207
Generally speaking, the runner should follow fail fast approach. If i put profile name in the corresponding field i definetely want to run inspector exactly with this profile. If it's not possible, a clear exception should be thrown instead of running with misterious settings. Also i found there are no way to get verbose log, and this is also very complicates issues solving.
regards, Alex
One more strange thing - include/exclude patterns ignored. Something definetely wrong. how do i trace it?
Alexander, Etienne
Please check:
Please let me know of results.
Thanks
Hi, Michael.
Finally i manged to run inspections as expected. To do it i installed a clear agent, not bundled in Teamcity. also i cleared path as you suggested.
But include/exclude options still ignored.
regards, Alex
Hi Michael
1) In IDEA, it works properly. Only the 1 inspection that is enabled in my custom profile is executed.
2) TC uses the same revisions of the inspections file. The inspection file is checked in to VCS.
3) The profile path is cleared.
It is not applying my inspection profile.
Please see the attached two screen shots.
Not sure if this is relevant, but the agent runs on the same machine as the TC server.
Regards, Etienne
Attachment(s):
Screen shot 2011-07-01 at 13.30.04.png
Screen shot 2011-07-01 at 13.28.38.png
Etienne, hi.
for me solution was to install fresh agent.
Regards, Alex
Also i disabled a part of my inspections. Coudn't be the issue caused by unssuported in teamcity, but supported in the latest idea 10.5?
regards, Alex
Message was edited by: Alexander Ashitkin
Hi Alexander
Thanks for the hint. We've had this issue since the very veginning when the agent was all fresh. I hope Michael can help identify the problem.
Regards, Etienne
Hi, Etienne, just to adjust - i installed it to the separate directory and i start it with agent.sh, not runall.bat also, what's the inspection name? i could try to reproduce it in my env.
regards, Alex
One more point - if your profile isn't locked and teamcity byndled version of idea is newer, it will run all the newly added inspections by default. so you'll get spellchecking inspection if your profile created in idea 8, etc.
regards, Alex
Hi
Maybe the problem is that I have more than one inspection profile defined and the one that I want to use in my TC build is not the default profile??
I've attached the two profiles and the profile settings fle. The only inspection I want to run is this:
<inspection_tool enabled="true" level="WARNING" enabled_by_default="true" />
Regards, Etienne
Attachment(s):
inspectionProfiles.zip
Hi Michael
Some questions:
1) Do I have to lock the profile?
2) Does the profile have to be the default profile of my IDEA project?
I've attached my twp profile files plus the profile settings file. They all come from the .idea/inspectionProfiles folder of my project.
Regards, Etienne
Attachment(s):
inspectionProfiles.zip