2018-05-01 12:18:03 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -u
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2017-12-01 18:06:09 +00:00
|
|
|
exit_code=0
|
2018-06-28 12:53:49 +00:00
|
|
|
docker_flags=(--rm -v "$PWD:/testplugin" -v "$PWD/test:/home" -w /testplugin "$DOCKER_RUN_IMAGE")
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2017-12-01 18:06:09 +00:00
|
|
|
echo '========================================'
|
|
|
|
echo 'Running custom linting rules'
|
|
|
|
echo '========================================'
|
|
|
|
echo 'Custom warnings/errors follow:'
|
|
|
|
echo
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2017-12-01 18:06:09 +00:00
|
|
|
set -o pipefail
|
2020-11-28 16:25:27 +00:00
|
|
|
docker run "${docker_flags[@]}" test/script/custom-linting-rules . || exit_code=$?
|
2017-12-01 18:06:09 +00:00
|
|
|
set +o pipefail
|
|
|
|
echo
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2017-12-01 18:06:09 +00:00
|
|
|
echo '========================================'
|
|
|
|
echo 'Checking for duplicate tags'
|
|
|
|
echo '========================================'
|
|
|
|
echo 'Duplicate tags follow:'
|
|
|
|
echo
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2020-11-28 16:25:27 +00:00
|
|
|
set -o pipefail
|
|
|
|
docker run "${docker_flags[@]}" test/script/check-duplicate-tags . || exit_code=$?
|
|
|
|
set +o pipefail
|
|
|
|
echo
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2017-12-01 18:06:09 +00:00
|
|
|
echo '========================================'
|
|
|
|
echo 'Checking for invalid tag references'
|
|
|
|
echo '========================================'
|
|
|
|
echo 'Invalid tag references tags follow:'
|
|
|
|
echo
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2020-11-28 16:25:27 +00:00
|
|
|
set -o pipefail
|
|
|
|
docker run "${docker_flags[@]}" test/script/check-tag-references || exit_code=$?
|
|
|
|
set +o pipefail
|
2017-02-21 11:50:59 +00:00
|
|
|
|
2017-12-01 18:06:09 +00:00
|
|
|
echo '========================================'
|
2019-08-13 06:04:48 +00:00
|
|
|
echo 'diff supported-tools.md and doc/ale-supported-languages-and-tools.txt tables'
|
2017-12-01 18:06:09 +00:00
|
|
|
echo '========================================'
|
|
|
|
echo 'Differences follow:'
|
|
|
|
echo
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2020-11-28 04:32:51 +00:00
|
|
|
set -o pipefail
|
|
|
|
docker run "${docker_flags[@]}" test/script/check-supported-tools-tables || exit_code=$?
|
|
|
|
set +o pipefail
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2017-12-01 18:06:09 +00:00
|
|
|
echo '========================================'
|
|
|
|
echo 'Look for badly aligned doc tags'
|
|
|
|
echo '========================================'
|
|
|
|
echo 'Badly aligned tags follow:'
|
|
|
|
echo
|
2017-01-22 14:54:57 +00:00
|
|
|
|
2020-11-28 16:25:27 +00:00
|
|
|
set -o pipefail
|
|
|
|
docker run "${docker_flags[@]}" test/script/check-tag-alignment || exit_code=$?
|
|
|
|
set +o pipefail
|
2017-12-01 18:06:09 +00:00
|
|
|
|
|
|
|
echo '========================================'
|
|
|
|
echo 'Look for table of contents issues'
|
|
|
|
echo '========================================'
|
|
|
|
echo
|
|
|
|
|
2020-11-28 16:25:27 +00:00
|
|
|
set -o pipefail
|
|
|
|
docker run "${docker_flags[@]}" test/script/check-toc || exit_code=$?
|
|
|
|
set +o pipefail
|
2017-12-01 18:06:09 +00:00
|
|
|
|
2019-05-21 12:53:09 +00:00
|
|
|
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
|
|
|
|
|
2017-12-01 18:06:09 +00:00
|
|
|
exit $exit_code
|