summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2017-12-11 08:26:32 +0000
committerClaudiu Popa <pcmanticore@gmail.com>2017-12-11 09:26:32 +0100
commit444c878efb48976aa8b91266d42dc2086e6009b1 (patch)
treef011f18f34cdf348a7265b61041cc2290a6ce568
parent6ef5895e7d8dd54a12f5e2a37239806ac3ef0a71 (diff)
downloadpylint-git-444c878efb48976aa8b91266d42dc2086e6009b1.tar.gz
Make the documentation build reproducibly. (#1761)
Whilst working on the Reproducible Builds effort [0], we noticed that pylint could not be built reproducibly. This is due to the documentation generator iterating over the filesystem in a nondeterminstic order and then iterating over an internal, nondeterminstic, data structure. This was originally filed in Debian as #883913. [0] https://reproducible-builds.org/ [1] https://bugs.debian.org/883913 Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
-rwxr-xr-xdoc/exts/pylint_extensions.py1
-rw-r--r--pylint/utils.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/exts/pylint_extensions.py b/doc/exts/pylint_extensions.py
index eeb8d6026..86099d860 100755
--- a/doc/exts/pylint_extensions.py
+++ b/doc/exts/pylint_extensions.py
@@ -42,6 +42,7 @@ def builder_inited(app):
elif ext == '.rst':
doc_files['pylint.extensions.' + name] = os.path.join(ext_path,
filename)
+ modules.sort()
if not modules:
sys.exit("No Pylint extensions found?")
diff --git a/pylint/utils.py b/pylint/utils.py
index dc796a883..6c39f99d1 100644
--- a/pylint/utils.py
+++ b/pylint/utils.py
@@ -471,7 +471,7 @@ class MessagesHandlerMixIn(object):
print("Below is a list of all checkers and their features.", file=stream)
print("", file=stream)
- for checker, info in six.iteritems(by_checker):
+ for checker, info in sorted(six.iteritems(by_checker)):
self._print_checker_doc(checker, info, stream=stream)
@staticmethod