These two directories are not added to sys.path when running the
application, so there is no need to add them for pylint. When they are
added, they make it impossible to run pylint properly because
lms.lib.xblock is imported when trying to import xblock.
The platform includes jshint as a development tool, and our
builds are enforcing a limit on total number of jshint violations.
This commit will enforce no new jshint violations on a per-change
basis, much like pylint and pep8 are enforced. So with this change,
we'll be enforcing our linting requirements consistently, regardless
of type of violations.
Also on Jenkins, runs quality task after installing jshint.
This complexity metric is created by using radon (see changed files for additional
documentation links). This tool calculates cyclomatic complexity and provides a numeric grade
where a lower number is better (e.g., less complex).
JShint will be executed with paver run_jshint, which will use a defined set of
directories (likewise defined are directories to ignore). A limit can be imposed
on the total number of violations. Note that this change does NOT include adding
jshint to diff-quality or `paver run_quality`.
With the old logic, we weren't running pylint on openedx at all. We
were also running it on lms/lib/comment_client twice, and on the
installed xblock third-party library.
We are not using the limit flag in the actual run_pep8 method; removing
that from scripts. Operationally, pep8 has been enforcing a limit of
zero for awhile; this finishes that realization.
Also, all pep8 reports now appear under the reports/pep8 folder, rather than
per-system.
When using -p, the underlying diff-quality command will pass that
number as a value for --fail-under.
For example,
paver run_quality -p 75
Will pass 75 into the --fail-under switch on diff-quality.
Also upgrades diff-cover in order to take advantage of this funcitonality.
This adds the -l switch, wherein a violations limit is passed in. For
example:
paver run_pep8 -l 700
Will fail if more than 700 violations are found.
By default, this limit is not enforced (i.e. if the -l switch
is not passed into the command, then a limit will not be put
into effect for that run)