[CI] Add a check to detect tab in lua files (#3919)

pull/3921/head
onde2rock 6 years ago committed by Frans de Jonge
parent 0fc7a5ed6d
commit dad7f209fa

@ -21,5 +21,12 @@ if [ "${unscaled_size_check}" ] || [ "${unscaled_size_check_geom}" ]; then
exit 1
fi
tab_detected=$(grep -P "\\t" --include \*.lua --exclude={dateparser.lua,xml.lua} --recursive {reader,setupkoenv,datastorage}.lua frontend plugins spec || true)
if [ "${tab_detected}" ]; then
echo -e "\\n${ANSI_RED}Error TAB character detected"
echo "${tab_detected}"
exit 1
fi
echo -e "\n${ANSI_GREEN}Luacheck results"
luajit "$(which luacheck)" --no-color -q {reader,setupkoenv,datastorage}.lua frontend plugins spec

Loading…
Cancel
Save