feat. upgrade module (#27)

* feat. upgrade module

* upgrade misc.

* add apps folder

* codestyle

* fix sql build
This commit is contained in:
Walter Pagani
2023-08-02 07:36:57 -03:00
committed by GitHub
parent 9b4e6793d9
commit fe113f9494
19 changed files with 324 additions and 11 deletions

0
apps/.gitkeep Normal file
View File

0
apps/ci/.gitkeep Normal file
View File

40
apps/ci/ci-codestyle.sh Normal file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
set -e
echo "Codestyle check script:"
echo
declare -A singleLineRegexChecks=(
["LOG_.+GetCounter"]="Use ObjectGuid::ToString().c_str() method instead of ObjectGuid::GetCounter() when logging. Check the lines above"
["[[: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
declare -A multiLineRegexChecks=(
["LOG_[^;]+GetCounter"]="Use ObjectGuid::ToString().c_str() method instead of ObjectGuid::GetCounter() when logging. Check the lines above"
["\n\n\n"]="Multiple blank lines detected, keep only one. Check the files above"
)
for check in ${!multiLineRegexChecks[@]}; do
echo " Checking RegEx: '${check}'"
if grep -Pzo -r -I ${check} src; then
echo
echo
echo "${multiLineRegexChecks[$check]}"
exit 1
fi
done
echo
echo "Everything looks good"