Inspection unit test - info level highlight

Answered

Hi,

I'm implementing some Java code inspections in a plugin, and I'm in the middle of adding unit tests for validating the highlighted code segments,

One of the inspections is registered with INFO level in the plugin.xml, so according to documentation I'm trying to use the <info descr=""> tag in the unit test resource file to mark the highlighted parts.

However when I run the unit test against these test files, the actual result is that there is no highlight in the expected segments, but when I check the inspection manually, by running the IDE, it works properly.

Technically I would say it is true that there is no highlight happening, because the code snippet is only marked with a white underline, not an actual highlight.

My unit tests extend LightJavaInspectionTestCase, and highlight validation works properly for error and warning leveas.

 

Could you please confirm whether info level underlining is indeed not considered as highlighting? And if that's true can you provide some detail on how to validate info level inspection similar to other-level highlighting.

0
1 comment

Please make sure your test sets

checkInfos=true

in testHighlighting()/checkHighlighting() calls

0

Please sign in to leave a comment.