From 0a0a861f37dfac49ecc01023b56565b59da7cbd1 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Tue, 2 Jul 2019 01:23:05 +0800 Subject: [PATCH] ci: bring up lintTpl.sh --- .gitignore | 4 +++- .travis.yml | 4 ++++ test/listTpl.sh | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 test/listTpl.sh diff --git a/.gitignore b/.gitignore index 8868b5bf..6a738f0a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,6 @@ storage/*.* .user.ini public/.user.ini -resources/views/material/analytics.tpl \ No newline at end of file +resources/views/material/analytics.tpl + +test/tpl_files.txt \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 748a1359..6a3e97f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,6 +64,10 @@ before_script: - if [[ ! -n "$(git log -1 --pretty=%B | grep 'skip lint')" ]]; then phplint '**/*.php' '!vendor/**'; fi + - chmod +x ./test/listTpl.sh + - if [[ ! -n "$(git log -1 --pretty=%B | grep 'skip lint')" ]]; then + ./test/listTpl.sh + fi script: - cp config/.config.example.php config/.config.php - php xcat createAdmin test@example.com test diff --git a/test/listTpl.sh b/test/listTpl.sh new file mode 100755 index 00000000..1aa982dc --- /dev/null +++ b/test/listTpl.sh @@ -0,0 +1,10 @@ +#!/bin/sh +find ./ -name "*.tpl" > ./test/tpl_files.txt + +while read LINE +do + echo '--------------------------------------------------' + echo $LINE + echo '--------------------------------------------------' + ./test/smart-lint/smart-lint "$LINE" y +done < ./test/tpl_files.txt