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

16 comments
Comment actions Permalink

Hi!

Any ideas on that?

Thanks, Alex.

0
Comment actions Permalink

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

0
Comment actions Permalink

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.

0
Comment actions Permalink

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]: Initializing project...done.
[07:51:39]: Inspecting with profile 'RedundantSuppression'
[07:51:40]: Analyzing code ... 0%
...
[07:52:42]: Analyzing code ... 111%
[07:52:43]: Done.
...

[07:52:47]: Build finished
[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
0
Comment actions Permalink

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

0
Comment actions Permalink

One more strange thing - include/exclude patterns ignored. Something definetely wrong. how do i trace it?

0
Comment actions Permalink

Alexander, Etienne

Please check:

  • The inspections are correctly ignorred when you start them insteractivelly in IDEA by Analyze | Inspect code with the custom profile
  • TeamCity build uses the same revision of the inspection profile (the file is committed to VCS)
  • Profile path setting is cleared

Please let me know of results.

Thanks
0
Comment actions Permalink

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

0
Comment actions Permalink

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
0
Comment actions Permalink

Etienne, hi.
for me solution was to install fresh agent.

Regards, Alex

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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
0
Comment actions Permalink

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
0

Please sign in to leave a comment.