mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-21 16:19:21 +00:00
1601769019
Add a --fail-under <score> flag, also configurable in a `.pylintrc`file If the final score is more than the specified score, it's considered a success and pylint exits with exit code 0. Otherwise, it's considered a failure and pylint exits with its current exit code based on the messages issued. Close #2242
56 lines
2.0 KiB
ReStructuredText
56 lines
2.0 KiB
ReStructuredText
**************************
|
||
What's New in Pylint 2.5
|
||
**************************
|
||
|
||
:Release: 2.5
|
||
:Date: TBC
|
||
|
||
|
||
Summary -- Release highlights
|
||
=============================
|
||
|
||
|
||
New checkers
|
||
============
|
||
|
||
* A new check ``f-string-without-interpolation`` was added.
|
||
|
||
This check is emitted whenever **pylint** detects the use of an
|
||
f-string without having any interpolated values in it, which means
|
||
that the f-string can be a normal string.
|
||
|
||
|
||
Other Changes
|
||
=============
|
||
|
||
* Don't emit ``line-too-long`` for multilines when a
|
||
`pylint:disable=line-too-long` comment stands at their end.
|
||
|
||
For example the following code will not trigger any ``line-too-long`` message::
|
||
|
||
def example():
|
||
"""
|
||
This is a very very very long line within a docstring that should trigger a pylint C0301 error line-too-long
|
||
|
||
Even spread on multiple lines, the disable command is still effective on very very very, maybe too much long docstring
|
||
"""#pylint: disable=line-too-long
|
||
pass
|
||
|
||
* Configuration can be read from a setup.cfg or pyproject.toml file
|
||
in the current directory.
|
||
A setup.cfg must prepend pylintrc section names with ``pylint.``,
|
||
for example ``[pylint.MESSAGES CONTROL]``.
|
||
A pyproject.toml file must prepend section names with ``tool.pylint.``,
|
||
for example ``[tool.pylint.'MESSAGES CONTROL']``.
|
||
These files can also be passed in on the command line.
|
||
|
||
* Add new good-names-rgx and bad-names-rgx to enable white-/blacklisting of regular expressions
|
||
|
||
To enable better handling of whitelisting/blacklisting names, we added two new config options: good-names-rgxs: a comma-
|
||
separated list of regexes, that if a name matches will be exempt of naming-checking. bad-names-rgxs: a comma-
|
||
separated list of regexes, that if a name matches will be always marked as a blacklisted name.
|
||
|
||
* Mutable ``collections.*`` are now flagged as dangerous defaults.
|
||
|
||
* Add new --fail-under flag for setting the threshold for the score to fail overall tests. If the score is over the fail-under threshold, pylint will complete SystemExit with value 0 to indicate no errors.
|