Module: check_mk
Branch: master
Commit: 93f38f2b9b9914fb9145789337fe080467f237d2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=93f38f2b9b9914…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Sep 6 08:16:21 2018 +0200
Activate unused-variable warnings for everything but the checks.
Of course the suppression in the checks is a temporary measure, but doing it
this way, at least things don't get worse in the rest of the code... :-}
Change-Id: I78add1b778734ec6f3a836eed6b81ec36ad4ea0e
---
.pylintrc | 4 ----
tests/pylint/test_pylint.py | 3 +++
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/.pylintrc b/.pylintrc
index 19bd203..74d62b0 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -27,10 +27,6 @@ disable=
# through our code and fix a few obscure places.
abstract-method,
#---------------------------------------------------------------------------
- # We should really enable this, there could be some typos hiding which are
- # real bugs. Just some work to do...
- unused-variable,
- #---------------------------------------------------------------------------
# Enabling this would be very desirable, it vastly improves readability and
# it might even be necessary for tools like mypy. Fixing this involves some
# amount of relatively easy work, especially if we want to avoid code
diff --git a/tests/pylint/test_pylint.py b/tests/pylint/test_pylint.py
index 425e41a..8380537 100755
--- a/tests/pylint/test_pylint.py
+++ b/tests/pylint/test_pylint.py
@@ -127,6 +127,9 @@ def inv_tree(path, default_value=None):
pylint_cmk.add_file(f, repo_path() + "/cmk_base/check_api.py")
pylint_cmk.add_file(f, repo_path() + "/cmk_base/inventory_plugins.py")
+ # TODO: Remove this when all our checks are fixed.
+ f.write("# pylint: disable=unused-variable\n")
+
# Now add the checks
for path in pylint_cmk.check_files(repo_path() + "/checks"):
pylint_cmk.add_file(f, path)