AWSWebcrawler / General

1 stars 0 forks source link

Verwendung eines Linters #91

Open philippvarga-thi opened 2 years ago

philippvarga-thi commented 2 years ago

Als Data Engineer möchte ich einen Linter verwenden, um eine bessere Code Qualität zu erhalten.

ihr könnt euch einen eigenen Linter raussuchen, gerne einfach pylint verwenden

[Hier ergänzende Erläuterungen]

DoD:

anh2426 commented 2 years ago

The pylint config file "pylintrc" is in the development branch now.

pylint documentation

Installation:

or

Running pylint: e.g. To run pylint on the module _"itemfactory.py", you have to open the Terminal in PyCharm and type in the following expression: pylint item_factory.py If you get an error _"No module named itemfactory.py (fatal)", you have to type in the whole path of the file; e.g. in my case: pylint /Users/andreaheigl/git/webscraper/crawler/item_factory/item_factory.py

Pylint output:

{path}:{line}:{column}: {msg_id}: {msg} ({symbol})

e.g.

(file:////Users/andreaheigl/git/webscraper/crawler/item_factory/item_factory.py:3) :0: C0411: standard import "import logging" should be placed before "from lxml import etree" (wrong-import-order)

anh2426 commented 2 years ago

Anleitung zur Verwendung des Linters im Wiki: 02e - Pylint

sik7467 commented 2 years ago

I found the Pylint Plugin for Pycharm. I will add a wiki entry on how to install/use the plugin.