-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
151 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Codestyle Checks | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
check-codestyle: | ||
strategy: | ||
fail-fast: false | ||
|
||
runs-on: ubuntu-latest | ||
name: Check Codestyling | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Check Codestyling | ||
run: source ./apps/ci/ci-codestyle.sh |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
data/sql/db-world/updates/recruit_friend_acore_string_add_cooldown.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
SET @ENTRY:=35457; | ||
DELETE FROM `acore_string` WHERE `entry`=@ENTRY+0; | ||
DELETE FROM `acore_string` WHERE `entry` IN (@ENTRY+0, @ENTRY+1); | ||
INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`) VALUES | ||
(@ENTRY+0, '[Recruit Friend] You have to wait the cooldown to recruit a friend', '', '', '', '', '', '[Reclutar Amigo] Debes esperar el cooldown para reclutar un amigo', '[Reclutar Amigo] Debes esperar el cooldown para reclutar un amigo', ''); | ||
(@ENTRY+0, '[Recruit Friend] You must wait for %u sec. to use this command again.', '', '', '', '', '', '[Reclutar Amigo] Debes esperar %u seg para utilizar este comando nuevamente.', '[Reclutar Amigo] Debes esperar %u seg para utilizar este comando nuevamente.', ''), | ||
(@ENTRY+1, '[Recruit Friend] You haven\'t recruited anyone. Use the .recruit add command to do this.', '', '', '', '', '', '[Recruit Friend] No has reclutado a nadie. Utiliza el comando .recruit add para hacerlo.', '[Recruit Friend] No has reclutado a nadie. Utiliza el comando .recruit add para hacerlo.', ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters