feat(CI/Codestyle): added codestyle check (#3668)

This commit is contained in:
Kargatum 2021-01-09 17:59:50 +07:00 committed by GitHub
parent 57aa46244d
commit ea93a5c1a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
400 changed files with 238 additions and 748 deletions

23
apps/ci/ci-codestyle.sh Normal file
View file

@ -0,0 +1,23 @@
#!/bin/bash
set -e
echo "Codestyle check script:"
echo
declare -A singleLineRegexChecks=(
["[[:blank:]]$"]="Remove whitespace at the end of the lines above"
["\t"]="Replace tabs with 4 spaces in the lines above"
)
for check in ${!singleLineRegexChecks[@]}; do
echo " Checking RegEx: '${check}'"
if grep -P -r -I -n ${check} src; then
echo
echo "${singleLineRegexChecks[$check]}"
exit 1
fi
done
echo
echo "Everything looks good"