pylintrc: version all of them
When running pylint tools in depot_tools itself, we default to the
pylintrc file all the time even though we have versioned ones we
want to use instead. This breaks things like `./pylint-2.17 foo.py`.
Rename the existing pylintrc to 2.6 and duplicate it to 2.7 so we
clear out the 'pylintrc' file and the wrappers always default to the
versioned ones.
We've been riding on pylint being a bit compatible across versions,
but it seems to be accelerating in adding/removing diagnostics and
settings, so this is more churn to add new versions, but we don't
have much choice.
Change-Id: I5c20a41ed8aead3e90b6dda8f5f2fc3b87cfb251
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6150453
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
diff --git a/pylintrc-2.17 b/pylintrc-2.17
index 2341a59..30b526b 100644
--- a/pylintrc-2.17
+++ b/pylintrc-2.17
@@ -1,3 +1,5 @@
+# Default config file for our pylint-2.17 wrapper.
+
[MAIN]
# Analyse import fallback blocks. This can be used to support both Python 2 and
diff --git a/pylintrc b/pylintrc-2.6
similarity index 98%
rename from pylintrc
rename to pylintrc-2.6
index d46658a..7102818 100644
--- a/pylintrc
+++ b/pylintrc-2.6
@@ -1,3 +1,5 @@
+# Default config file for our pylint-2.6 wrapper.
+
[MASTER]
# Specify a configuration file.
diff --git a/pylintrc b/pylintrc-2.7
similarity index 98%
copy from pylintrc
copy to pylintrc-2.7
index d46658a..35c8c88 100644
--- a/pylintrc
+++ b/pylintrc-2.7
@@ -1,3 +1,5 @@
+# Default config file for our pylint-2.7 wrapper.
+
[MASTER]
# Specify a configuration file.
diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py
index 96b27f7..9694b0c 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -2890,7 +2890,7 @@
presubmit.sigint_handler.wait.return_value = (b'', None)
pylint = os.path.join(_ROOT, 'pylint-2.7')
- pylintrc = os.path.join(_ROOT, 'pylintrc')
+ pylintrc = os.path.join(_ROOT, 'pylintrc-2.7')
env = {str('PYTHONPATH'): str('')}
if sys.platform == 'win32':
pylint += '.bat'