1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:20:03 +08:00
SpaceVim/.ci/script.sh

34 lines
850 B
Bash
Raw Normal View History

#!/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
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
elif [ "$LINT" = "vint" ]; then
2017-12-17 13:46:27 +08:00
vint .
elif [ "$LINT" = "vint-errors" ]; then
2017-12-17 13:46:27 +08:00
vint --error .
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
fi
set +x