diff --git a/.ci/check.sh b/.ci/check.sh index 8a9a20702..894444ef7 100755 --- a/.ci/check.sh +++ b/.ci/check.sh @@ -23,10 +23,17 @@ 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 -e "\\n${ANSI_RED}Warning: tab character detected. Please use spaces." echo "${tab_detected}" exit 1 fi +newline_split=$(grep -Pzo "(_|gettext)\((\n|\s)+('|\"|\[\[)" --include \*.lua --exclude={dateparser.lua,xml.lua} --recursive {reader,setupkoenv,datastorage}.lua frontend plugins spec || true) +if [ "${newline_split}" ]; then + echo -e "\\n${ANSI_RED}Warning: whitespace detected between gettext() call and string." + echo "${newline_split}" + exit 1 +fi + echo -e "\n${ANSI_GREEN}Luacheck results" luajit "$(which luacheck)" --no-color -q {reader,setupkoenv,datastorage}.lua frontend plugins spec