Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pycharm analysis complete. One typo found. Where is it?

Tags:

I use Pycharm 2016.1.4 (latest version at the moment) and it has a small box on the right top corner of the window (a checkbox if everything is correct).

enter image description here

When you click on it, it tells you some information about warnings/errors/typos.

Now that I understood that I have some problems, I would try to fix them. It is easy to see where errors and warnings are (their lines are highlighted on the right side of the scroll). But how can I quickly (without looking through whole text for a curly underline) identify positions of the typos?

like image 976
Salvador Dali Avatar asked Jun 18 '16 08:06

Salvador Dali


People also ask

How to see errors in PyCharm?

PyCharm analyzes the code from the modified files by running inspections from the selected profile. If any errors or warnings are detected, you will see a notification. In the notification, click Review to see the list of the detected problems in the Messages tool window.

How do I fix warnings in PyCharm?

Apply fixes in the Problems tool window All detected problems are listed in the left part of the tool window. Click a problem to display inspection details on the right. icon on the toolbar or in the context menu. You can also press Alt+Enter and select a suitable fix from the popup menu.


2 Answers

PyCharm tells you the type of the problem and it's location by tiny lines on the scroll bar of that file. Different colours mean different types of errors.

Red lines are breaking errors, yellow ones are suggestions. You can click on those little lines to be taken to the correct place.

This does not show the location of typos, that is true. But I found a workaround by going Preferences -> Inspections and turning the Spelling -> Typo severity to Weak warning in which case typos are properly displayed and you can use hotkeys for Next highlighted error and Previous highlighted error which are shown in your Preferences -> Keymap panel. For me, those are F2 and Shift + F2, so I have to use Fn + F2 or Fn + Shift + F2 because I'm on a Macbook.

But I most often use the Code -> Inspect code option, because this searches your whole Project/Module for errors, warnings and even typos and shows them in a really convenient way in a different panel, where you can also click on the errors to be taken to the correct place. Also it shows the problem synopsis and a possible resolution.

like image 197
Eilyre Avatar answered Oct 14 '22 05:10

Eilyre


You can set the color for typos by searching for "typo" in the Settings dialog box. (For my version, it is in Editor / Color Scheme / General, within the "Errors and Warnings" group. Changing how typos are displayed helps you to locate them without changing their warning level or similar.

like image 31
jciloa Avatar answered Oct 14 '22 03:10

jciloa