This patch fixes the pep8 issues of the tool scripts and
configures tox to run pep8 on the tools directory.
Two hacking rules have been modified to ignore the tool directory as both
rules are checking oslo usage which is not critical in case of tools
- N310 use timeutils instead of datetime module
- N324 use jsonutils instead of json module
The tools/xenserver directory is still excluded from pep8 as it contains
scripts that are expected to run on dom0 with python2.4 therefore the
following rules cannot be meaningfully followed
- H231 Python 3.x incompatible 'except x,y:' construct
- H233 Python 3.x incompatible use of print operator
Change-Id: Icfd9e708a2ca1e421676b410e41807b2e630718f
Pareseable output format and --include-ids parameter are deprecated
and ignored in the pylint version used on the gate.
These functions are replaced by the --msg-template parameter.
This patch changes the runner to use the new parameter so that the
job can run properly on the gate
Closes-Bug: #1394606
Change-Id: I1de424bae4c2b634cd0bc804cb7e81624c96a195
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.
Also a check is added to hacking to detect if they are re-added.
Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6
Closes-Bug: #1229324
This is for Python 3 compatibility, since Python 3 does not support
the print statement, only the print function. (Python 2.6 and 2.7
support both, depending on whether a __future__ import is used.)
Paths containing "xen" were left alone, because of comments in a
couple of the files indicating that the XenServer code needed to be
compatible with Python 2.4.
Fixes bug 1226943
Change-Id: I23b804a4d99500b4acf81dd19645ab06dfcc9f1c
The dynamic nature of our object model is going to cause lots of
heartache for pylint, especially in the actual definitions. This
just excludes that whole directory from pylint's view, which will
limit the heartache to only everywhere objects are actually used.
Related to blueprint unified-object-model
Change-Id: I7f1a4b10b8a5098aab2ab2e8ea5da15ec43f0e2e
Add a new silent test target lintstack based on pylint in Jenkins.
lintstack will compare the pylint errors between HEAD and HEAD~1,
filter out known false positives and report violations in pylint
original parseable format for Jenkins to consume.
Change-Id: Ic2962cb42a174bfe9535aea88475ff4ede3bf9ff