X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=tox.ini;h=b19d07e978620aa4b96adbd69737eaf47a5aef8f;hp=b235bf3ab80c7dfa8945d95c5eb0c379b56210e5;hb=599d4dcf12a290385421bd7b9ad4028af81b7d6a;hpb=073d7783a477e2b622ceba070e67f41ff51dac83 diff --git a/tox.ini b/tox.ini index b235bf3ab8..b19d07e978 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -25,8 +25,9 @@ # will execute only checks defined in "pylint" tox environment. [tox] -envlist = new_line_length, line_length, autogen, pylint, tc_naming, tc_coverage, - doc_verify +# Fast and brief checkers to front, slow or verbose checkers to back. +envlist = tc_naming, tc_coverage, copyright_year, new_line_length, line_length, + autogen, pylint, doc_verify # The following is needed as tox requires setup.py by default. skipsdist = true @@ -35,17 +36,22 @@ checker_dir = ./resources/libraries/bash/entry/check # TODO: Tox prints various warnings. Figure them out and fix them. -[testenv:pylint] -basepython = python2 -deps = - pylint==1.5.4 - -r ./requirements.txt +# Keep testenvs sorted alphabetically, please. + +[testenv:autogen] whitelist_externals = /bin/bash setenv = PYTHONPATH = {toxinidir} -# Run pylint, but hide its return value until python warnings are cleared. -commands = bash -c "bash {[tox]checker_dir}/pylint.sh || true" +commands = bash {[tox]checker_dir}/autogen.sh -# TODO: See FIXME in https://gerrit.fd.io/r/16423 +[testenv:copyright_year] +whitelist_externals = /bin/bash +setenv = PYTHONPATH = {toxinidir} +commands = bash {[tox]checker_dir}/copyright_year.sh + +[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" [testenv:line_length] whitelist_externals = /bin/bash @@ -59,26 +65,31 @@ whitelist_externals = /bin/bash # the checker has to remain non-voting. commands = bash -c "bash {[tox]checker_dir}/new_line.sh || true" -[testenv:autogen] +[testenv:pylint] +basepython = python3 +deps = + pylint==2.4.3 + -r ./requirements.txt whitelist_externals = /bin/bash setenv = PYTHONPATH = {toxinidir} -commands = bash {[tox]checker_dir}/autogen.sh +# Run pylint, but hide its return value until python warnings are cleared. +commands = bash -c "bash {[tox]checker_dir}/pylint.sh || true" -[testenv:tc_naming] -whitelist_externals = /bin/bash -commands = bash {[tox]checker_dir}/tc_naming.sh +# TODO: See FIXME in https://gerrit.fd.io/r/16423 [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. +[testenv:tc_naming] whitelist_externals = /bin/bash -commands = bash -c "bash {[tox]checker_dir}/doc_verify.sh || true" +commands = bash {[tox]checker_dir}/tc_naming.sh + +# Keep testenvs sorted alphabetically, please. -# TODO: Migrate current docs check here. +# TODO: Add a checker against unresolved merge conflicts. +# See: https://gerrit.fd.io/r/c/vpp/+/26956 # TODO: Create voting "pylint 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.