How to get the list of errors in my source file (groovy) ?

已回答

Hi,

How can I get the list of errors in my source file ?

For example I have this error (I use this symbol as an array but it's in fact a function, so it's not found):

I didn't see this error before running code, then when execution arrive here, I get an exception "groovy.lang.MissingPropertyException: No such property:"

If IntelliJ know this symbol doesn't exist before running, surely there is a way to have a list of such errors. Then I can check before I run my code so I don't have to run this particular function to get an exception and realize that i made a mistake (in production for example..)

The only thing I found is "Analyze > Inspect Code" but it show me hundreds of minor warnings, and nowhere is a list of unresolved symbols. I even checked in configuration if there was some checkbox to enable this kind of error detection in the analyze config but I found nothing.

Thank you

0

Thank you for your answer. Following the instructions in the link, i am able to highlight the unresolved symbol in red but it doesn't show in the analyse result. The person which answer on the link you gave say the same thing :

But what makes me mad is that I can't force Idea to show these errors in the results if you run Analyze on whole projects. It shows all the other inspection errors but not this one.

Even when analyzing just the file it doesnt show

Seems like a bug

0

Thanks, I installed 2019.2 and it is working

0

请先登录再写评论。