SINTEF / Splipy

Spline modelling made easy.
GNU General Public License v3.0
102 stars 18 forks source link

add basic pylint configuration #31

Closed akva2 closed 7 years ago

akva2 commented 7 years ago

This adds a basic configuration file for pylint. It is pretty much vanilla, but it's nice to have the configurability at the source.

VikingScientist commented 7 years ago

This would be really great to have in here.

Add a short description on how-to-use and/or why-to-use in Readme.md and I'll put this in.

akva2 commented 7 years ago

readme updated.

VikingScientist commented 7 years ago

Missing installation instructions (use pip and not apt-get)

akva2 commented 7 years ago

evil installation instructions added.

VikingScientist commented 7 years ago

With this installation instructions, I get an executable pylint and not pylint3

akva2 commented 7 years ago

argh, the inconsistencies of the python world ;)

VikingScientist commented 7 years ago

Also: the tool seem ruthless towards the code. Wall of text crits you with the following errors/warnings/refractors

+-------------------------------+------------+
|message id                     |occurrences |
+===============================+============+
|unused-wildcard-import         |43          |
+-------------------------------+------------+
|too-many-locals                |19          |
+-------------------------------+------------+
|unused-import                  |18          |
+-------------------------------+------------+
|wildcard-import                |11          |
+-------------------------------+------------+
|unused-variable                |11          |
+-------------------------------+------------+
|attribute-defined-outside-init |11          |
+-------------------------------+------------+
|anomalous-backslash-in-string  |11          |
+-------------------------------+------------+
|duplicate-code                 |9           |
+-------------------------------+------------+
|unnecessary-semicolon          |8           |
+-------------------------------+------------+
|too-many-branches              |8           |
+-------------------------------+------------+
|redefined-builtin              |8           |
+-------------------------------+------------+
|too-many-statements            |6           |
+-------------------------------+------------+
|redefined-outer-name           |5           |
+-------------------------------+------------+
|fixme                          |5           |
+-------------------------------+------------+
|unused-argument                |4           |
+-------------------------------+------------+
|undefined-variable             |4           |
+-------------------------------+------------+
|undefined-loop-variable        |4           |
+-------------------------------+------------+
|protected-access               |4           |
+-------------------------------+------------+
|dangerous-default-value        |4           |
+-------------------------------+------------+
|arguments-differ               |4           |
+-------------------------------+------------+
|super-init-not-called          |3           |
+-------------------------------+------------+
|deprecated-method              |3           |
+-------------------------------+------------+
|too-many-arguments             |2           |
+-------------------------------+------------+
|no-self-use                    |2           |
+-------------------------------+------------+
|no-else-return                 |2           |
+-------------------------------+------------+
|function-redefined             |2           |
+-------------------------------+------------+
|unsubscriptable-object         |1           |
+-------------------------------+------------+
|too-many-public-methods        |1           |
+-------------------------------+------------+
|too-many-instance-attributes   |1           |
+-------------------------------+------------+
|too-few-public-methods         |1           |
+-------------------------------+------------+
|pointless-string-statement     |1           |
+-------------------------------+------------+
|notimplemented-raised          |1           |
+-------------------------------+------------+
|not-callable                   |1           |
+-------------------------------+------------+
|no-name-in-module              |1           |
+-------------------------------+------------+
|no-member                      |1           |
+-------------------------------+------------+
|invalid-unary-operand-type     |1           |
+-------------------------------+------------+
|import-error                   |1           |
+-------------------------------+------------+
|abstract-method                |1           |
+-------------------------------+------------+

Rates the code as 9.44/10, but I can't tell if 10 or 1 is good.

akva2 commented 7 years ago

yes? that's the whole point. not to massage your ego but to beat it.

VikingScientist commented 7 years ago

Haha, yes I guess that is true :laughing: Seems like a nice tool to have :+1: