mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 20:34:53 +08:00
fix(CI): cppcheck failure step (#17240)
* feat: add cppcheck for scripts * fix: cppcheck step failure * trigger cppcheck build, it should fail * fix: cppcheck should succeed * fix: cppcheck
This commit is contained in:
parent
b1c92f498a
commit
168192b731
15
.github/workflows/cpp-check.yml
vendored
15
.github/workflows/cpp-check.yml
vendored
@ -26,12 +26,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt update -y
|
sudo apt update -y
|
||||||
sudo apt install -y cppcheck
|
sudo apt install -y cppcheck
|
||||||
cppcheck --force --inline-suppr \
|
cppcheck --force --inline-suppr --suppressions-list=./.suppress.cppcheck src/ --output-file=report.txt
|
||||||
-i src/server/game/Achievements/AchievementMgr.cpp \
|
|
||||||
-i src/server/game/AuctionHouse/AuctionHouseMgr.cpp \
|
if [ -s report.txt ]; then # if file is not empty
|
||||||
-i src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp \
|
cat report.txt
|
||||||
-i src/server/game/DungeonFinding/LFGMgr.cpp \
|
exit 1 # let github action fails
|
||||||
-i src/server/game/Entities/GameObject/GameObject.cpp \
|
fi
|
||||||
-i src/server/game/Entities/Pet/Pet.cpp \
|
|
||||||
-i src/server/game/Entities/Player/Player.cpp \
|
|
||||||
src/
|
|
||||||
|
|||||||
1
.suppress.cppcheck
Normal file
1
.suppress.cppcheck
Normal file
@ -0,0 +1 @@
|
|||||||
|
cppcheckError
|
||||||
@ -45,6 +45,7 @@ enum AuthStatus
|
|||||||
STATUS_CLOSED
|
STATUS_CLOSED
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// cppcheck-suppress ctuOneDefinitionRuleViolation
|
||||||
struct AccountInfo
|
struct AccountInfo
|
||||||
{
|
{
|
||||||
void LoadResult(Field* fields);
|
void LoadResult(Field* fields);
|
||||||
|
|||||||
@ -57,6 +57,7 @@ namespace WorldPackets
|
|||||||
class AC_GAME_API PlayMusic final : public ServerPacket
|
class AC_GAME_API PlayMusic final : public ServerPacket
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// cppcheck-suppress missingReturn
|
||||||
PlayMusic() : ServerPacket(SMSG_PLAY_MUSIC, 4) { }
|
PlayMusic() : ServerPacket(SMSG_PLAY_MUSIC, 4) { }
|
||||||
PlayMusic(uint32 soundKitID) : ServerPacket(SMSG_PLAY_MUSIC, 4), SoundKitID(soundKitID) { }
|
PlayMusic(uint32 soundKitID) : ServerPacket(SMSG_PLAY_MUSIC, 4), SoundKitID(soundKitID) { }
|
||||||
|
|
||||||
@ -68,6 +69,7 @@ namespace WorldPackets
|
|||||||
class AC_GAME_API PlayObjectSound final : public ServerPacket
|
class AC_GAME_API PlayObjectSound final : public ServerPacket
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// cppcheck-suppress missingReturn
|
||||||
PlayObjectSound() : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 4 + 8) { }
|
PlayObjectSound() : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 4 + 8) { }
|
||||||
PlayObjectSound(ObjectGuid const& sourceObjectGUID, uint32 soundKitID)
|
PlayObjectSound(ObjectGuid const& sourceObjectGUID, uint32 soundKitID)
|
||||||
: ServerPacket(SMSG_PLAY_OBJECT_SOUND, 4 + 8), SourceObjectGUID(sourceObjectGUID), SoundKitID(soundKitID) { }
|
: ServerPacket(SMSG_PLAY_OBJECT_SOUND, 4 + 8), SourceObjectGUID(sourceObjectGUID), SoundKitID(soundKitID) { }
|
||||||
@ -82,6 +84,7 @@ namespace WorldPackets
|
|||||||
class AC_GAME_API Playsound final : public ServerPacket
|
class AC_GAME_API Playsound final : public ServerPacket
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// cppcheck-suppress missingReturn
|
||||||
Playsound() : ServerPacket(SMSG_PLAY_SOUND, 4) { }
|
Playsound() : ServerPacket(SMSG_PLAY_SOUND, 4) { }
|
||||||
Playsound(uint32 soundKitID) : ServerPacket(SMSG_PLAY_SOUND, 4), SoundKitID(soundKitID) { }
|
Playsound(uint32 soundKitID) : ServerPacket(SMSG_PLAY_SOUND, 4), SoundKitID(soundKitID) { }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user