TeamCity code inspections and IDEA code inspections are different
Code inspection runner shows 97 warnings, though there are now warnings
shown in IDEA.
Some of the warnings are switched off so this is incorrect behavior of
ipr runner.
Other warnings are switched on and shown by the runner correctly but
they aren't shown by IDEA.
We use build 4037. In the build 3776 everything was Ok when we used we
"lock profile workaround" proposed by Anna. Locking every profile now
fixes only incorrectly shown by the runner inspections.
Behavior of inspection runner and IDEA "code analyze inspections" should
be identical. Otherwise the inspection runner is useless.
Vitaly Berov
P.S. As a programmer I wonder how these bugs could happen at all. Do you
not you use the same code for TeamCity inspection runner and IDEA
inspection runner?
Please sign in to leave a comment.
Hello Vitaly,
Shown in IDEA editor or after Analyse Code? BTW what version of IDEA do you
use? TeamCity does not use your version it ships with own virsion which may
differ from your. Thus for not locked profiles additional inspections may
be switch on and additional bugs and fixes for different inspections may
be introduced.
Ipr runner ;)? What exact bugs do you mean? I am sorry but with such diagnostic
I can explain nothing
Again I do not understand :(
As a conclusion could you please file JIRA issue and describe what difference
do you see (with code fragments if it is possible) between IDEA version ...
and TeamCity version ...
Your notes are highly appreciated :)
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
I'm encountering the same issue.
I'm trying to run the inspections with a file generated at Idea 6.0.4. I have setup all inspections that Idea offers to check. I have made sure that these settings are stored in the IPR file and committed it to CVS (seems quite difficult to convince Idea to store these settings into ipr file and not into "home\.IntelliJIdea60\config\inspection\Inspections.xml" file). When running inspections on TC build 4037, it finds around 26000 problems. When running inspections on TC 1.2 if found around 35000 problems... Also I noticed that there the results of inspection when its settings are stored in ipr file differs from results when these inspection settings are stored in an external file.
Anna Kozlova wrote:
>> Code inspection runner shows 97 warnings, though there are now
>> warnings shown in IDEA.
Inspection runner shows 97 warnings. IDEA Analyze->Inspect code shows no
warnings. IDEA #6148.
Can I use exactly the same version of IDEA as TeamCity? Or can TeamCity
use my version?
>> Some of the warnings are switched off so this is incorrect behavior of
>> ipr runner.
Sorry, inspection runner. The correct description is: inspection runner
shows inspection warnings which switched off in our profile. You have
the .ipr file I use.
>>
>> Other warnings are switched on and shown by the runner correctly but
>> they aren't shown by IDEA.
>>
>> We use build 4037. In the build 3776 everything was Ok when we used we
>> "lock profile workaround" proposed by Anna. Locking every profile now
>> fixes only incorrectly shown by the runner inspections.
Ok.
1. Some correct warnings are shown only in TeamCity, but not shown in IDEA.
2. If I lock every our profile, inspection runner show 67 correct
warnings. But these warnings aren't shown in IDEA.
If you don't understand it here you won't understand it in JIRA. I can
write in Russian, if you want :)
Are every problem I described here is a real bug or it's "expected
behavior"?
Vitaly Berov
I tried to run inspections using another file to setup them (not from the IPR file) and it seems it helped - the inspection took longer and the build log is different. Unfortunatelly it did not finish since of this error:
: Analyzing code... 77%
: java.lang.OutOfMemoryError: Java heap space
: ERROR - ction.ex.InspectionApplication -
: java.lang.OutOfMemoryError: Java heap space
: ERROR - ction.ex.InspectionApplication - IntelliJ IDEA (Selena) #6777 Build #6777
: ERROR - ction.ex.InspectionApplication - JDK: 1.5.0_10
: ERROR - ction.ex.InspectionApplication - VM: Java HotSpot(TM) Client VM
: ERROR - ction.ex.InspectionApplication - Vendor: Sun Microsystems Inc.
: ERROR - ction.ex.InspectionApplication - OS: Windows 2003
: ERROR - ction.ex.InspectionApplication - Last Action:
: Java heap space
: updating diff...
: Inspection output:
I have already increased the Java memory heap to 512MB by setting these in Runner: Inspection page: JVM command line parameters: -Xmx512m.
On TC 1.2 it worked fine but on TC 2.0 Beta seems it is not enough. Should I increase it even more?
Hello Vitaly,
>> Hello Vitaly,
>>
>>> Code inspection runner shows 97 warnings, though there are now
>>> warnings shown in IDEA.
>>>
>> Shown in IDEA editor or after Analyse Code? BTW what version of IDEA
>> do you use? TeamCity does not use your version it ships with own
>> virsion which may differ from your. Thus for not locked profiles
>> additional inspections may be switch on and additional bugs and fixes
>> for different inspections may be introduced.
>>
Agra uses SELENA ~#6780. You can replace idea in TeamCity (catalog plugins/idea)
with one from TeamCity 1.2 which uses ~ Idea 6148 as well you can update
local Idea to SELENA. (SELENA M1 will be available after Agra releases)
Seems that all mess is about IDEA versions:
As I stated before when you lock the profile you prevent other (new) inspections
to appear in it -> may be we renamed somehow inspections identification keys
and renamed inspections treated as new ones? Could you please name these
inspections one by one?
When old Idea doesn't contain all real problems - it is bugs in that old
version and we can't integrate all bug fixes due to possibility to introduce
new ones :(
For me it is convenient to use idea plugin for TeamCity to highlight problems
from server in editor. Then you can obtain results from resource consuming
inspections ... I do not think that it is common usecase to compare local
inspections in editor and on server -> I suggest to treat local problems
locally and if you browse something horrible on server you can fix them manually
or update to SELENA ;)
>>> Some of the warnings are switched off so this is incorrect behavior
>>> of ipr runner.
>>>
>> Ipr runner ;)? What exact bugs do you mean? I am sorry but with such
>> diagnostic I can explain nothing
>>
>>> Other warnings are switched on and shown by the runner correctly but
>>> they aren't shown by IDEA.
>>>
>>> We use build 4037. In the build 3776 everything was Ok when we used
>>> we "lock profile workaround" proposed by Anna. Locking every profile
>>> now fixes only incorrectly shown by the runner inspections.
>>>
>> Again I do not understand :(
>>
>> As a conclusion could you please file JIRA issue and describe what
>> difference do you see (with code fragments if it is possible) between
>> IDEA version ... and TeamCity version ...
>>
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
The problematic inspections are (switched off in our profile but shown
in IDEA):
General, Boolean method is always reverted
Declaration Redundancy, Unnecessary module dependency
Thanks for explanation. I suspected the "different versions" problem :)
We'll try to use SELENA (there seems to be good inspections bugfixes
there) or TeamCity 1.2 IDEA.
Vitaly Berov
Anna Kozlova wrote:
>> Anna Kozlova wrote:
>>
>>> Hello Vitaly,
>>>
>>>> Code inspection runner shows 97 warnings, though there are now
>>>> warnings shown in IDEA.
>>>>
>>> Shown in IDEA editor or after Analyse Code? BTW what version of IDEA
>>> do you use? TeamCity does not use your version it ships with own
>>> virsion which may differ from your. Thus for not locked profiles
>>> additional inspections may be switch on and additional bugs and fixes
>>> for different inspections may be introduced.
>>>
>> Inspection runner shows 97 warnings. IDEA Analyze->Inspect code shows
>> no warnings. IDEA #6148.
>> Can I use exactly the same version of IDEA as TeamCity? Or can
>> TeamCity use my version?
Hello Vitaly,
Indeed, I switch them on by default and in your profile they should not be
even mentioned
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
>> Hello Vitaly,
>>
>>> Anna Kozlova wrote:
>>>
>>>> Hello Vitaly,
>>>>
>>>>> Code inspection runner shows 97 warnings, though there are now
>>>>> warnings shown in IDEA.
>>>>>
>>>> Shown in IDEA editor or after Analyse Code? BTW what version of
>>>> IDEA do you use? TeamCity does not use your version it ships with
>>>> own virsion which may differ from your. Thus for not locked
>>>> profiles additional inspections may be switch on and additional
>>>> bugs and fixes for different inspections may be introduced.
>>>>
>>> Inspection runner shows 97 warnings. IDEA Analyze->Inspect code
>>> shows no warnings. IDEA #6148.
>>>
>>> Can I use exactly the same version of IDEA as TeamCity? Or can
>>> TeamCity use my version?
>>>
>> Agra uses SELENA ~#6780. You can replace idea in TeamCity (catalog
>> plugins/idea) with one from TeamCity 1.2 which uses ~ Idea 6148 as
>> well you can update local Idea to SELENA. (SELENA M1 will be
>> available after Agra releases)
>>
>> Seems that all mess is about IDEA versions:
>> As I stated before when you lock the profile you prevent other (new)
>> inspections to appear in it -> may be we renamed somehow inspections
>> identification keys and renamed inspections treated as new ones?
>> Could
>> you please name these inspections one by one?
>> When old Idea doesn't contain all real problems - it is bugs in that
>> old
>> version and we can't integrate all bug fixes due to possibility to
>> introduce new ones :(
>> For me it is convenient to use idea plugin for TeamCity to highlight
>> problems from server in editor. Then you can obtain results from
>> resource consuming inspections ... I do not think that it is common
>> usecase to compare local inspections in editor and on server -> I
>> suggest to treat local problems locally and if you browse something
>> horrible on server you can fix them manually or update to SELENA ;)
>>
Hello Anna,
Anna Kozlova wrote:
Does this mean that if I have an inspection profile that I was using
with TC1.2 / Idea 6 and then I upgrade to Agra beta that you turn on
some global inspections and I can't turn them off? That would explain
my performance problems :(
R
Hello Robert,
You can turn them off by locking your profile.
Thank you.
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
>> Indeed, I switch them on by default and in your profile they should
>> not be even mentioned
>>