summaryrefslogtreecommitdiff
path: root/doc/faq.rst
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2021-12-28 10:30:41 -0500
committerGitHub <noreply@github.com>2021-12-28 16:30:41 +0100
commitf56db7d76429ddd86b3e333b60720c389fbd1025 (patch)
treedc783f813b57d96feb0a1833008c3efe8a07b921 /doc/faq.rst
parentefe59ca44b9ed350c9790d79a39a7343af5e7ea7 (diff)
downloadpylint-git-f56db7d76429ddd86b3e333b60720c389fbd1025.tar.gz
Fix #2399: Avoid negative scores by default (#5595)
Diffstat (limited to 'doc/faq.rst')
-rw-r--r--doc/faq.rst15
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/faq.rst b/doc/faq.rst
index a2c0f2252..47dc9b501 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -249,15 +249,16 @@ default value by changing the mixin-class-rgx option.
6.1 Pylint gave my code a negative rating out of ten. That can't be right!
--------------------------------------------------------------------------
-Even though the final rating Pylint renders is nominally out of ten, there's no
-lower bound on it. By default, the formula to calculate score is ::
+Prior to Pylint 2.13.0, the score formula used by default had no lower
+bound. The new default score formula is ::
- 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
-
-However, this option can be changed in the Pylint rc file. If having negative
-values really bugs you, you can set the formula to be the maximum of 0 and the
-above expression.
+ max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
+If your project contains a configuration file created by an earlier version of
+Pylint, you can set ``evaluation`` to the above expression to get the new
+behavior. Likewise, since negative values are still technically supported,
+``evaluation`` can be set to a version of the above expression that does not
+enforce a floor of zero.
6.2 I think I found a bug in Pylint. What should I do?
-------------------------------------------------------