X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=tox.ini;h=4617e73e54bdc4375a00caad550ccbaa5933da66;hp=0fd86453288c41aba9e91451efed1b629cfbb295;hb=aa5f30a291cc6781cf7071118d1179d201df75b2;hpb=694b418272e9d7670ac69d477ed731bb7445b65a diff --git a/tox.ini b/tox.ini index 0fd8645328..4617e73e54 100644 --- a/tox.ini +++ b/tox.ini @@ -25,46 +25,66 @@ # will execute only checks defined in "pylint" tox environment. [tox] -envlist = linelength, autogen, pylint +envlist = new_line_length, line_length, autogen, pylint, tc_naming, tc_coverage, + doc_verify + # 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] +basepython = python3 deps = - pylint==1.5.4 + pylint==2.4.3 -r ./requirements.txt 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 + +[testenv:tc_naming] +whitelist_externals = /bin/bash +commands = bash {[tox]checker_dir}/tc_naming.sh + +[testenv:tc_coverage] +whitelist_externals = /bin/bash +# Coverage is not needed to be voting. +commands = bash -c "bash {[tox]checker_dir}/tc_coverage.sh || true" + +[testenv:doc_verify] +# Fix all documentaion error before enabling voting. +whitelist_externals = /bin/bash +commands = bash -c "bash {[tox]checker_dir}/doc_verify.sh || true" # TODO: Migrate current docs check here. -# TODO: Create license checker. # TODO: Create voting "pylint violations should not increase" checker. -# TODO: Create voting "linelength violations should not increase" checker. +# TODO: Create voting checker to reject suites with Force Tags of other suite. +# TODO: Create voting checker against tags not in tag_documentation.rst file. # TODO: Create Robot suite Documentation checker (backslash if not next mark). # TODO: Create .yaml specific checker, so people can override long line check. # TODO: Create .rst specific checker, if there is one allowing # to override line check. # TODO: You get the idea, replace line check with something smarter -# wherever possible. \ No newline at end of file +# wherever possible.