diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-03-20 13:23:30 +0100 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2019-03-20 13:23:30 +0100 |
commit | 6f082130e508e151bb8e92ce459a10b05b3c82b8 (patch) | |
tree | 5bfd8b0862a81c0d95fd886116e720000e349739 /tox.ini | |
parent | 1901d5ad9a903d261f98d5d2423afbba90b89206 (diff) |
Add tox checker for lengths of new lines only
- Still non-voting, but useful.
Change-Id: Idd6f345f0f14fdbc237ff66f5e010801ea08dc5b
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -25,12 +25,13 @@ # will execute only checks defined in "pylint" tox environment. [tox] -envlist = linelength, autogen, pylint +envlist = new_line_length, line_length, autogen, pylint # The following is needed as tox requires setup.py by default. skipsdist = true +# Just a shorthand to avoid long lines. +checker_dir = ./resources/libraries/bash/entry/check -# TODO: Tox prints various warnings. -# Figure out what they are about and fix them. +# TODO: Tox prints various warnings. Figure them out and fix them. [testenv:pylint] deps = @@ -39,24 +40,26 @@ deps = whitelist_externals = /bin/bash setenv = PYTHONPATH = {toxinidir} # Run pylint, but hide its return value until python warnings are cleared. -commands = bash -c "bash resources/libraries/bash/entry/check/pylint.sh || true" +commands = bash -c "bash {[tox]checker_dir}/pylint.sh || true" # TODO: See FIXME in https://gerrit.fd.io/r/16423 -[testenv:linelength] +[testenv:line_length] whitelist_externals = /bin/bash # Fix all transgressions and remove the " || true" workaround. -commands = bash -c "bash resources/libraries/bash/entry/check/line.sh || true" +commands = bash -c "bash {[tox]checker_dir}/line.sh || true" -# It would be possible to add a check which fails -# if number of long lines increases (from parent commit value), -# and have it voting. -# But that would basically prevent us from adding new suites righ now. :( +[testenv:new_line_length] +whitelist_externals = /bin/bash +# Adding .svg, big .rst tables, .yaml and similar still requires long lines. +# As current implementation is too dumb to filter those out, +# the checker has to remain non-voting. +commands = bash -c "bash {[tox]checker_dir}/new_line.sh || true" [testenv:autogen] whitelist_externals = /bin/bash setenv = PYTHONPATH = {toxinidir} -commands = bash resources/libraries/bash/entry/check/autogen.sh +commands = bash {[tox]checker_dir}/autogen.sh # TODO: Migrate current docs check here. # TODO: Create license checker. |