Skip to content

Commit 3ae362f

Browse files
committed
Enable checking of html files with html5validator.
@see https://github.com/svenkreiss/html5validator Fix #109
1 parent 6897d41 commit 3ae362f

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ before_script:
1010
mysql -u travis -e 'CREATE DATABASE mystamps CHARACTER SET utf8;';
1111
else
1212
npm install -g bootlint;
13+
pip install --user html5validator;
1314
fi
1415

1516
script:

src/main/scripts/ci/check-build-and-verify.sh

+17-7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
1313
mvn --batch-mode license:check >license.log 2>&1 || touch LICENSE_FAIL
1414
find src -type f -name '*.html' | xargs bootlint >bootlint.log 2>&1 || touch BOOTLINT_FAIL
1515
mvn --batch-mode jasmine:test >jasmine.log 2>&1 || touch JASMINE_FAIL
16+
# FIXME: add check for src/main/config/nginx/503.*html
17+
html5validator \
18+
--root src/main/webapp/WEB-INF/views \
19+
--ignore-re 'Attribute “(th|sec|togglz|xmlns):[a-z]+” not allowed' \
20+
'Attribute “(th|sec|togglz):[a-z]+” is not serializable' \
21+
'Attribute with the local name “xmlns:[a-z]+” is not serializable' \
22+
--show-warnings \
23+
>validator.log 2>&1 || touch HTML_FAIL
1624
fi
1725

1826
mvn --batch-mode verify >verify.log 2>&1 || touch VERIFY_FAIL
@@ -27,25 +35,27 @@ if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
2735
print_status LICENSE_FAIL 'Check license headers'
2836
print_status BOOTLINT_FAIL 'Run bootlint'
2937
print_status JASMINE_FAIL 'Run JavaScript unit tests'
38+
print_status HTML_FAIL 'Run html5validator'
3039
fi
3140

3241
print_status VERIFY_FAIL 'Compile and run unit/integration tests'
3342

3443
echo
3544

3645
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
37-
print_log cs.log 'Run CheckStyle'
38-
print_log pmd.log 'Run PMD'
39-
print_log license.log 'Check license headers'
40-
print_log bootlint.log 'Run bootlint'
41-
print_log jasmine.log 'Run JavaScript unit tests'
46+
print_log cs.log 'Run CheckStyle'
47+
print_log pmd.log 'Run PMD'
48+
print_log license.log 'Check license headers'
49+
print_log bootlint.log 'Run bootlint'
50+
print_log jasmine.log 'Run JavaScript unit tests'
51+
print_log validator.log 'Run html5validator'
4252
fi
4353

4454
print_log verify.log 'Compile and run unit/integration tests'
4555

46-
rm -f cs.log pmd.log license.log bootlint.log verify.log jasmine.log
56+
rm -f cs.log pmd.log license.log bootlint.log jasmine.log validator.log verify.log
4757

4858
if [ -n "$(ls *_FAIL 2>/dev/null)" ]; then
49-
rm -f CS_FAIL PMD_FAIL LICENSE_FAIL BOOTLINT_FAIL VERIFY_FAIL JASMINE_FAIL
59+
rm -f CS_FAIL PMD_FAIL LICENSE_FAIL BOOTLINT_FAIL JASMINE_FAIL HTML_FAIL VERIFY_FAIL
5060
exit 1
5161
fi

0 commit comments

Comments
 (0)