]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/script/custom-checks

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit 'd49e95aa7ba744f0a7f544aca43afdb6aab41f24' as '.vim/bundle/asyncomplete...
[etc/vim.git] / .vim / bundle / ale / test / script / custom-checks
1 #!/usr/bin/env bash
2
3 set -e
4 set -u
5
6 exit_code=0
7 docker_flags=(--rm -v "$PWD:/testplugin" -v "$PWD/test:/home" -w /testplugin "$DOCKER_RUN_IMAGE")
8
9 echo '========================================'
10 echo 'Running custom linting rules'
11 echo '========================================'
12 echo 'Custom warnings/errors follow:'
13 echo
14
15 set -o pipefail
16 "$DOCKER" run "${docker_flags[@]}" test/script/custom-linting-rules . || exit_code=$?
17 set +o pipefail
18 echo
19
20 echo '========================================'
21 echo 'Checking for duplicate tags'
22 echo '========================================'
23 echo 'Duplicate tags follow:'
24 echo
25
26 set -o pipefail
27 "$DOCKER" run "${docker_flags[@]}" test/script/check-duplicate-tags . || exit_code=$?
28 set +o pipefail
29 echo
30
31 echo '========================================'
32 echo 'Checking for invalid tag references'
33 echo '========================================'
34 echo 'Invalid tag references tags follow:'
35 echo
36
37 set -o pipefail
38 "$DOCKER" run "${docker_flags[@]}" test/script/check-tag-references || exit_code=$?
39 set +o pipefail
40
41 echo '========================================'
42 echo 'diff supported-tools.md and doc/ale-supported-languages-and-tools.txt tables'
43 echo '========================================'
44 echo 'Differences follow:'
45 echo
46
47 set -o pipefail
48 "$DOCKER" run "${docker_flags[@]}" test/script/check-supported-tools-tables || exit_code=$?
49 set +o pipefail
50
51 echo '========================================'
52 echo 'Look for badly aligned doc tags'
53 echo '========================================'
54 echo 'Badly aligned tags follow:'
55 echo
56
57 set -o pipefail
58 "$DOCKER" run "${docker_flags[@]}" test/script/check-tag-alignment || exit_code=$?
59 set +o pipefail
60
61 echo '========================================'
62 echo 'Look for table of contents issues'
63 echo '========================================'
64 echo
65
66 set -o pipefail
67 "$DOCKER" run "${docker_flags[@]}" test/script/check-toc || exit_code=$?
68 set +o pipefail
69
70 echo '========================================'
71 echo 'Check Python code'
72 echo '========================================'
73 echo
74
75 "$DOCKER" run --rm -v "$PWD:/testplugin" "$DOCKER_RUN_IMAGE" \
76     python -W ignore -m unittest discover /testplugin/test/python \
77     || exit_code=$?
78 echo
79
80 exit $exit_code