2017-11-22 15:27:35 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
if [ "$LINT" = "vimlint" ]; then
|
2017-12-17 13:46:27 +08:00
|
|
|
for file in $(git diff --name-only HEAD dev | grep .vim$);
|
|
|
|
do
|
|
|
|
sh /tmp/vimlint/bin/vimlint.sh -l /tmp/vimlint -p /tmp/vimlparser $file;
|
|
|
|
done
|
2017-11-22 15:27:35 +08:00
|
|
|
elif [ "$LINT" = "vimlint-errors" ]; then
|
2017-12-17 13:46:27 +08:00
|
|
|
if [[ -f build_log ]]; then
|
|
|
|
rm build_log
|
|
|
|
fi
|
2018-01-20 16:27:14 +08:00
|
|
|
for file in $(git diff --name-only HEAD master | grep .vim$);
|
2017-12-17 13:46:27 +08:00
|
|
|
do
|
|
|
|
/tmp/vimlint/bin/vimlint.sh -E -l /tmp/vimlint -p /tmp/vimlparser $file >> build_log 2>&1;
|
|
|
|
done
|
|
|
|
if [[ -s build_log ]]; then
|
|
|
|
cat build_log
|
|
|
|
exit 2
|
|
|
|
fi
|
2017-11-22 15:27:35 +08:00
|
|
|
elif [ "$LINT" = "vint" ]; then
|
2017-12-17 13:46:27 +08:00
|
|
|
vint .
|
2017-11-22 15:27:35 +08:00
|
|
|
elif [ "$LINT" = "vint-errors" ]; then
|
2017-12-17 13:46:27 +08:00
|
|
|
vint --error .
|
2017-11-22 15:27:35 +08:00
|
|
|
elif [ "$LINT" = "vader" ]; then
|
2017-12-17 13:46:27 +08:00
|
|
|
vim --version
|
|
|
|
pip install covimerage
|
|
|
|
make test_coverage
|
|
|
|
covimerage -vv xml --omit 'build/*'
|
|
|
|
pip install codecov
|
|
|
|
codecov -X search gcov pycov -f coverage.xml
|
2017-11-22 15:27:35 +08:00
|
|
|
fi
|
|
|
|
set +x
|