Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can PyCharm list all of Python errors in a project?

I use python 2.7 in a virtual environment and PyCharm 2.7 (new build as of feb 07 2013).

Whenever I open a python file in it that has unambiguous errors (equivalent to compile errors in other languages, e.g. using undeclared variables, calling non-existing functions), it shows red stripes in the gutter of the file.

So, I discover errors randomly as I happened to navigate to a file that contains them. What I would really like is to be able to list all of the python errors in a separate window. The Visual Studio 2005/2008/2010/... IDE has a separate "Errors" view that lists all of them with file names and line numbers, and gives me the ability to click on any one of these errors and navigate directly to the source.

Does PyCharm have anything like this?

like image 323
Hamish Grubijan Avatar asked Feb 15 '13 19:02

Hamish Grubijan


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.

Which Linter does PyCharm use?

By default, PyCharm uses the TSLint package from the project node_modules folder and the tslint. json configuration file from the folder where the current file is stored. If no tslint. json is found in the current file folder, PyCharm will look for one in its parent folders up to the project root.

Why is my Python code not running in PyCharm?

To fix this go to Settings or press Ctrl+Alt+S go to Project > Project Interpreter and from the Project Interpreter dropdown select Show All then from the list select the python.exe on its current path and press the + symbol on your right.


2 Answers

You can call Code|Inspect Code (formerly Analyze|Inspect Code, thanks to @CrackerJack9) to get all errors and warnings and ways to fix them. In result panel you can choose to see only errors (red/yellow button at the left side).

like image 107
Vladimir Avatar answered Oct 17 '22 07:10

Vladimir


In Pycharm 2.6.3:
Code -> Inspect Code

like image 20
forward Avatar answered Oct 17 '22 07:10

forward