flaviut
flaviut

Reputation: 2143

Pycharm doesn't show errors in inspection results

I have several files with python errors in them (unresolved references, if that matters), so I ran Inspect code in order to get a list of all the errors. Unfortunately, it looks like they don't show up:

inspection results

The errors definitely do exist, because when I open a python file with errors in it, they are shown:

file error analysis example

Am I missing some hidden option, or this this a bug?

Upvotes: 3

Views: 1785

Answers (2)

user1689987
user1689987

Reputation: 1566

My issue was I needed to "Add content root" under "Project Structure" in Preferences. I had no content root.

Upvotes: 0

Piotr Dawidiuk
Piotr Dawidiuk

Reputation: 3092

Theoretically on your default settings code inspection and current file analysis should work on the same inspection profile.

For current file analysis you can check profile by typing ctrl+alt+Shift+H and clicking Configure inspections link.

enter image description here

For code inspection you set profile after selecting Inspect Code from Code menu element.

enter image description here

My observations

After changing inspection rules for current file analysis I don't see any impact on Severity. I tried to restart IDE but nothing helped. It looks like a bug.

However, if I turn on/off the rule with a checkbox, it makes changes either on current file analysis or code inspection (they are running in the same inspection profile). It is ok, so the problem is only with severity.

enter image description here

Good news is that changing inspection rules works for code inspection. You can try to make code inspection similar to current file analysis (but not vice versa and that's a bug).

enter image description here

Notice that unresolved references by default are just warning, so code inspection works well.

PS My IDE version is 2016.3.2.

Upvotes: 1

Related Questions