is it possible to specify scope for inspection build?

We use some autogenerated code from third party vendors inside our
project. And we don't want to run any inspections for this code.

How can I specify "inspection scope" for "inspection builder"?

Vitaly Berov

5 comments
Comment actions Permalink

Vitaly Berov wrote:

We use some autogenerated code from third party vendors inside our
project. And we don't want to run any inspections for this code.

How can I specify "inspection scope" for "inspection builder"?

Vitaly Berov

Any comments?

0
Comment actions Permalink

Hello Vitaly,

You can assign different profiles for different scopes of your project. This
could be done through Settings|Errors|Project profiles table mapping in IDEA.
After that you should leave "path to profile file" field empty (if you use
TeamCity 1.2) or choose inspect with default project settings for Agra. That's
it. Setup empty profile for your autogenerated code and it won't be inspected
any more.

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Vitaly Berov wrote:

>> We use some autogenerated code from third party vendors inside our
>> project. And we don't want to run any inspections for this code.
>>
>> How can I specify "inspection scope" for "inspection builder"?
>>
>> Vitaly Berov
>>

Any comments?



0
Comment actions Permalink

Thanks for the answer, Anna

Could you point some link where I can find the details of
scope<->profile combination functionality?

For example, what happens if some file isn't covered by any scope? what
happens if scopes are intersected? how can I run inspection with project
scope<->profile set by hands (I can't find this possibility in the
Analyze->Inspect code... menu)?

Vitaly Berov

Anna Kozlova wrote:

Hello Vitaly,

You can assign different profiles for different scopes of your project.
This could be done through Settings|Errors|Project profiles table
mapping in IDEA. After that you should leave "path to profile file"
field empty (if you use TeamCity 1.2) or choose inspect with default
project settings for Agra. That's it. Setup empty profile for your
autogenerated code and it won't be inspected any more.

Thank you

---------------------
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Hello Vitaly,

It is described in IDEA Help.

P.S.

During profile search profiles-scopes table is scanning from top to bottom.
First scope containing current file defines corresponding inspection profile.
If profile wasn't found default project profile is used.

If you check to inspect with editor settings your mapping will be used.

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Thanks for the answer, Anna

Could you point some link where I can find the details of
scope<->profile combination functionality?

For example, what happens if some file isn't covered by any scope?
what happens if scopes are intersected? how can I run inspection with
project scope<->profile set by hands (I can't find this possibility in
the Analyze->Inspect code... menu)?

Vitaly Berov

Anna Kozlova wrote:

>> Hello Vitaly,
>>
>> You can assign different profiles for different scopes of your
>> project. This could be done through Settings|Errors|Project profiles
>> table mapping in IDEA. After that you should leave "path to profile
>> file" field empty (if you use TeamCity 1.2) or choose inspect with
>> default project settings for Agra. That's it. Setup empty profile for
>> your autogenerated code and it won't be inspected any more.
>>
>> Thank you
>>
>> -


>> Anna Kozlova
>> JetBrains Inc.
>> http://www.intellij.com
>> "Develop with pleasure!"


0
Comment actions Permalink

Thanks, it became clear now.

Vitaly Berov

Anna Kozlova wrote:

Hello Vitaly,

It is described in IDEA Help.

P.S.

During profile search profiles-scopes table is scanning from top to
bottom. First scope containing current file defines corresponding
inspection profile. If profile wasn't found default project profile is
used.

If you check to inspect with editor settings your mapping will be used.

Thank you

0

Please sign in to leave a comment.