X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/script/custom-checks?ds=sidebyside diff --git a/.vim/bundle/ale/test/script/custom-checks b/.vim/bundle/ale/test/script/custom-checks new file mode 100755 index 00000000..4cf1530c --- /dev/null +++ b/.vim/bundle/ale/test/script/custom-checks @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +set -e +set -u + +exit_code=0 +docker_flags=(--rm -v "$PWD:/testplugin" -v "$PWD/test:/home" -w /testplugin "$DOCKER_RUN_IMAGE") + +echo '========================================' +echo 'Running custom linting rules' +echo '========================================' +echo 'Custom warnings/errors follow:' +echo + +set -o pipefail +"$DOCKER" run "${docker_flags[@]}" test/script/custom-linting-rules . || exit_code=$? +set +o pipefail +echo + +echo '========================================' +echo 'Checking for duplicate tags' +echo '========================================' +echo 'Duplicate tags follow:' +echo + +set -o pipefail +"$DOCKER" run "${docker_flags[@]}" test/script/check-duplicate-tags . || exit_code=$? +set +o pipefail +echo + +echo '========================================' +echo 'Checking for invalid tag references' +echo '========================================' +echo 'Invalid tag references tags follow:' +echo + +set -o pipefail +"$DOCKER" run "${docker_flags[@]}" test/script/check-tag-references || exit_code=$? +set +o pipefail + +echo '========================================' +echo 'diff supported-tools.md and doc/ale-supported-languages-and-tools.txt tables' +echo '========================================' +echo 'Differences follow:' +echo + +set -o pipefail +"$DOCKER" run "${docker_flags[@]}" test/script/check-supported-tools-tables || exit_code=$? +set +o pipefail + +echo '========================================' +echo 'Look for badly aligned doc tags' +echo '========================================' +echo 'Badly aligned tags follow:' +echo + +set -o pipefail +"$DOCKER" run "${docker_flags[@]}" test/script/check-tag-alignment || exit_code=$? +set +o pipefail + +echo '========================================' +echo 'Look for table of contents issues' +echo '========================================' +echo + +set -o pipefail +"$DOCKER" run "${docker_flags[@]}" test/script/check-toc || exit_code=$? +set +o pipefail + +echo '========================================' +echo 'Check Python code' +echo '========================================' +echo + +"$DOCKER" run --rm -v "$PWD:/testplugin" "$DOCKER_RUN_IMAGE" \ + python -W ignore -m unittest discover /testplugin/test/python \ + || exit_code=$? +echo + +exit $exit_code